Skip to content

[Bug] Modal component triggers antd deprecation warning: maskClosable is deprecated #480

@hugetiny

Description

@hugetiny

Bug Description

The Modal component from @lobehub/ui is using the deprecated maskClosable prop from antd, which triggers a console warning in development mode.

Error Message

Warning: [antd: Modal] `maskClosable` is deprecated. Please use `mask.closable` instead.

Environment

  • @lobehub/ui version: 5.0.0
  • antd version: 6.2.3
  • react version: 19.2.4
  • Framework: Next.js 16.1.6

Root Cause

The Modal component in @lobehub/ui is passing maskClosable prop to antd's Modal, but antd 6.x has deprecated this prop in favor of mask: { closable: ... }.

Suggested Fix

Replace maskClosable with mask={{ closable: ... }} in the Modal component implementation.

Example:

- maskClosable={true}
+ mask={{ closable: true }}

Additional Context

This warning appears even when the consuming code doesn't explicitly use maskClosable, because it's set internally by the library. This affects all lobe-chat users as well.


Thank you for maintaining this excellent UI library! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions