mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [message] max affects grouping display (#18189)
fix(components): [message] Fix message grouping with max limit Prioritize grouping logic over max limit in message component closed #18117
This commit is contained in:
@@ -158,10 +158,6 @@ const message: MessageFn &
|
||||
) => {
|
||||
if (!isClient) return { close: () => undefined }
|
||||
|
||||
if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {
|
||||
return { close: () => undefined }
|
||||
}
|
||||
|
||||
const normalized = normalizeOptions(options)
|
||||
|
||||
if (normalized.grouping && instances.length) {
|
||||
@@ -175,6 +171,10 @@ const message: MessageFn &
|
||||
}
|
||||
}
|
||||
|
||||
if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {
|
||||
return { close: () => undefined }
|
||||
}
|
||||
|
||||
const instance = createMessage(normalized, context)
|
||||
|
||||
instances.push(instance)
|
||||
|
||||
Reference in New Issue
Block a user