-
Notifications
You must be signed in to change notification settings - Fork 2
Inform server that user wants to close the dialog. #52
Conversation
This needs to be removed when this PR is merged: vaadin/vaadin-dialog-flow#52
e609d6f
to
fae44e4
Compare
Client-side can close the dialog synchronously when the user presses escape or clicking outside. This makes server side unable to prevent closing if there are unsave changes etc. With this change, server side can listen to an event and decide whether to close the dialog. Fixes vaadin#37
fae44e4
to
a545967
Compare
Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks failed. src/main/java/com/vaadin/flow/component/dialog/Dialog.java, line 78 at r1 (raw file):
For the latter part
Or if there is another hook in 'vaadin-dialog' element to catch initialization complete then use that. Comments from Reviewable |
This fixes when dialog is created in pure java instead of in templates
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. src/main/java/com/vaadin/flow/component/dialog/Dialog.java, line 78 at r1 (raw file): Previously, caalador wrote…
This was working because in bakery dialog is created in a template, hence failing when creating it in pure java. I have moved the code to the block where the dialog is attached in java. This guarantees that the client-side element is actually enhanced and avoids adding more code to client side. Comments from Reviewable |
60a3b3e
to
75e2d60
Compare
6be6ab9
to
8e7b3c2
Compare
Reviewed 3 of 3 files at r2. Comments from Reviewable |
Client-side can close the dialog synchronously when the user presses escape or
clicking outside. This makes server side unable to prevent closing if there
are unsave changes etc. With this change, server side can listen to an event
and decide whether to close the dialog.
Fixes #37
This change is