-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confirm dialog before leaving the board without saving. #229
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please @AliLee0923 could you review if there is a way to show the Dialog or an alert when navigation events are dispatched? like the back and forward buttons
and the reload button. We should show the dialog to prevent the user from performing this without see the dialog. We should show this dialog or a native Alert before closing the tab/window.
@@ -30,17 +33,21 @@ export type BoardActions = { | |||
board: BoardRecord | null, | |||
) => void; | |||
setBoardIsUpToDate: () => void; | |||
setBoardLeaveStatus: (status: any) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using any
. It may lead to unexpected behavior in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already tried to use a specific type for this.
But I am not sure if it is possible or not, because the type of original variable is generic.
Hi, @tomivm |
Implemented confirm dialog before leaving the board without saving.
When users try to leave the created board with out saving, they will see confirm dialog letting them know they don't save the board and asking if they want to save or back.
close #76