mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
fix bug:The enqueueSnackbar Snackbar notification cannot auto-close. … (#4610)
fix bug:The enqueueSnackbar Snackbar notification cannot auto-close. #4608
This commit is contained in:
@@ -32,6 +32,11 @@ export const enqueueSnackbar = (notification) => {
|
||||
type: ENQUEUE_SNACKBAR,
|
||||
notification: {
|
||||
...notification,
|
||||
options: {
|
||||
...notification.options,
|
||||
persist: notification.options?.persist ?? false, // Default: auto-close enabled
|
||||
autoHideDuration: notification.options?.autoHideDuration ?? 5000 // Default auto-close duration: 5 seconds
|
||||
},
|
||||
key: key || new Date().getTime() + Math.random()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ const AgentflowGeneratorDialog = ({ show, dialogProps, onCancel, onConfirm }) =>
|
||||
options: {
|
||||
key: new Date().getTime() + Math.random(),
|
||||
variant: 'error',
|
||||
persist: true,
|
||||
persist: false,
|
||||
action: (key) => (
|
||||
<Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}>
|
||||
<IconX />
|
||||
@@ -146,7 +146,7 @@ const AgentflowGeneratorDialog = ({ show, dialogProps, onCancel, onConfirm }) =>
|
||||
options: {
|
||||
key: new Date().getTime() + Math.random(),
|
||||
variant: 'error',
|
||||
persist: true,
|
||||
persist: false,
|
||||
action: (key) => (
|
||||
<Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}>
|
||||
<IconX />
|
||||
|
||||
Reference in New Issue
Block a user