mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Updated to the latest version of the Notistack library. #7501
This commit is contained in:
@@ -230,7 +230,7 @@ define('pgadmin.node.server', [
|
||||
obj.generate_url(i, 'connect', d, true),
|
||||
).then(({data: res})=> {
|
||||
if (res.success == 1) {
|
||||
pgAdmin.Browser.notifier.success(res.info, null);
|
||||
pgAdmin.Browser.notifier.success(res.info);
|
||||
d = t.itemData(i);
|
||||
t.removeIcon(i);
|
||||
d.connected = false;
|
||||
|
||||
@@ -62,7 +62,7 @@ export default function BasePage({pageImage, title, children, messages}) {
|
||||
const snackbar = useSnackbar();
|
||||
useEffect(()=>{
|
||||
messages?.forEach((m)=>{
|
||||
snackbar.enqueueSnackbar(null, {
|
||||
snackbar.enqueueSnackbar({
|
||||
autoHideDuration: null,
|
||||
content: (key)=>{
|
||||
if(Array.isArray(m[0])) m[0] = m[0][0];
|
||||
|
||||
@@ -77,11 +77,11 @@ class SnackbarNotifier {
|
||||
|
||||
notify(content, autoHideDuration) {
|
||||
if (content) {
|
||||
let options = {autoHideDuration, content:(key) => (
|
||||
let options = {autoHideDuration, content:(key) => (
|
||||
<FinalNotifyContent>{React.cloneElement(content, {onClose:()=>{this.snackbarObj.closeSnackbar(key);}})}</FinalNotifyContent>
|
||||
)};
|
||||
options.content.displayName = 'content';
|
||||
this.snackbarObj.enqueueSnackbar(null, options);
|
||||
this.snackbarObj.enqueueSnackbar(options);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user