Skip to content
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

BlockUI: provide delay (before displaying the blockUI) #9604

Closed
nimo23 opened this issue Jan 7, 2023 · 5 comments · Fixed by #9609
Closed

BlockUI: provide delay (before displaying the blockUI) #9604

nimo23 opened this issue Jan 7, 2023 · 5 comments · Fixed by #9609
Assignees
Milestone

Comments

@nimo23
Copy link
Contributor

nimo23 commented Jan 7, 2023

Description

p:ajaxStatus has a delay property:

Delay in milliseconds before displaying the ajax status. Default is 0 meaning immediate.

<p:ajaxStatus delay="0"..>

Describe the solution you would like

Please provide the delay property also for p:blockUI:

Delay in milliseconds before displaying the blockUI. Default is 0 meaning immediate.

<p:blockUI delay="1200"..>

Additional context

No response

@nimo23 nimo23 added ‼️ needs-triage Issue needs triaging new feature labels Jan 7, 2023
@melloware
Copy link
Member

Hmmm i would be interested in your use case on why you would want to delaying blocking? Do you have an example?

@nimo23
Copy link
Contributor Author

nimo23 commented Jan 7, 2023

i would be interested in your use case on why you would want to delaying blocking

The same use case as why someone would add a delay in p:ajaxStatus:

Don't distract the user until it's needed, e.g. show the "blocking" only after 300ms - before 300ms, it's not worth to show the p:blockUI.

@melloware
Copy link
Member

But BlockUi is usually triggered by an Ajax request so wouldn't the delay on the ajax request just apply and it wouldn't start? So once again I don't understand your use case?

@nimo23
Copy link
Contributor Author

nimo23 commented Jan 7, 2023

But BlockUi is usually triggered by an Ajax request so wouldn't the delay on the ajax request just apply and it wouldn't start?

But p:ajaxStatus is independent from p:blockUI. When using p:ajaxStatus delay="200", then it only delays the p:ajaxStatus (so the spinner is only shown if the ajax request did not complete before 200ms).

I want that p:blockUI is only shown if the ajax request did not complete after 300ms. I do NOT want to delay the ajax request but I want to delay the visibility of the blockUI - if the ajax request completed before 300ms, then no blockUI should be shown. Nothing else.

@melloware
Copy link
Member

That makes sense I had no idea ajax status had that feature we should make them consistent.

@melloware melloware removed the ‼️ needs-triage Issue needs triaging label Jan 7, 2023
melloware added a commit to melloware/primefaces that referenced this issue Jan 7, 2023
@melloware melloware self-assigned this Jan 7, 2023
@melloware melloware added this to the 13.0.0 milestone Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants