Skip to content

Notification ignores config values set through App Package ComponentΒ #8055

@lanyeeee

Description

@lanyeeee
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

Windows 11 10.0.26100
Edge: Chromium (132.0.2957.140)
[email protected]([email protected])

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Set default notification config via in App.vue:
<a-app
:notification="{ placement: 'bottomRight', duration: 1 }"
:message="{ duration: 1, top: 200 }"
>
  1. Trigger notification using the API in child component:
const { notification } = AntdApp.useApp();
notification.success({ message: "message", description: "description" });
  1. Observe notification behavior

Clear and concise reproduction instructions are important for us to be able to triage your issue in a timely manner. Note that you can use Markdown to format lists and code.

What is expected?

Notification should appear at bottomRight position

Notification should auto-close after 1 second

(Message component works as expected with config inheritance)

What is actually happening?

Notification appears at default topRight position

Notification remains visible for ~5 seconds (default duration)

Message component correctly respects configured duration (1s) and position (top: 200px)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions