mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-18 02:07:04 +00:00
Fix bug in Dialog State store (#969)
This commit is contained in:
parent
56699ccb1b
commit
b65456f754
@ -41,7 +41,16 @@ export const useDialog: UseStore<DialogState> = create((set, get) => ({
|
|||||||
visible: false,
|
visible: false,
|
||||||
openDialog: (props: DialogProps) => set(() => ({ visible: true, dialogProps: props })),
|
openDialog: (props: DialogProps) => set(() => ({ visible: true, dialogProps: props })),
|
||||||
closeDialog: () =>
|
closeDialog: () =>
|
||||||
set((state) => ({ visible: false, openDialog: state.openDialog, closeDialog: state.closeDialog }), true),
|
set(
|
||||||
|
(state) => ({
|
||||||
|
visible: false,
|
||||||
|
openDialog: state.openDialog,
|
||||||
|
closeDialog: state.closeDialog,
|
||||||
|
showOkCancelModalDialog: state.showOkCancelModalDialog,
|
||||||
|
showOkModalDialog: state.showOkModalDialog,
|
||||||
|
}),
|
||||||
|
true // TODO: This probably should not be true but its causing a prod bug so easier to just set the proper state above
|
||||||
|
),
|
||||||
showOkCancelModalDialog: (
|
showOkCancelModalDialog: (
|
||||||
title: string,
|
title: string,
|
||||||
subText: string,
|
subText: string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user