feat(q-dialog): Add configurable option to not close dialog when clicking button fix: #17120 #17121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#17120
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
The PR fulfills these requirements:
dev
branch (orv[X]
branch)fix: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
Title: Add
notHide
Option toprops.ok
to Control Dialog Closure on Button ClickSummary:
Introduce a new
notHide
option withinprops.ok
to allow control over dialog visibility when the OK button is clicked. This feature will be particularly useful for scenarios where the dialog should remain open until an asynchronous task completes.Description:
Currently, the dialog closes immediately when the OK button is clicked. However, for certain operations, like asynchronous tasks, it may be necessary to keep the dialog open until the operation is fully completed. Implementing a
notHide
property will provide developers with the flexibility to prevent the dialog from closing right away.Proposed Solution:
notHide
boolean property toprops.ok
.notHide
is set totrue
, the dialog will not close upon clicking the OK button.Example Use Case:
Consider a form submission within a dialog where data validation and server-side processing are required. With the
notHide
option set totrue
, the dialog remains open, displaying a loading indicator while the submission is processed. Once the server responds, the dialog can be programmatically closed, either on success or after displaying an error message.