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

When property pane is in Non-Reactive mode, the validation function should only fire when clicked on "Apply" #91

Closed
vman opened this Issue Aug 27, 2016 · 7 comments

Comments

Projects
None yet
6 participants
@vman
Copy link
Contributor

vman commented Aug 27, 2016

Right now, no matter if in reactive or non-reactive mode, the validation function fires after the delay set in in the deferredValidationTime property (or the default 200 ms if the property is not set)

When in non-reactive mode, if the validation function fired only after the user clicked on "Apply", it would save a lot of unnecessary function calls, especially if the validation function is making an HTTP request somewhere (e.g. talking to SharePoint)

function fire

My code for this is located here if it helps:
https://github.com/vman/SPFx-Web-part-property-validator

@patmill

This comment has been minimized.

Copy link
Contributor

patmill commented Sep 2, 2016

This should be fixed in Drop 2

@patmill patmill closed this Sep 2, 2016

@vman

This comment has been minimized.

Copy link
Contributor Author

vman commented Sep 5, 2016

Looks like the issue is still present in Drop 2. Here is the code I have tried with:
https://github.com/vman/Drop-2-Validations

@srideshpande

This comment has been minimized.

Copy link

srideshpande commented May 8, 2017

Hello @vman ,

Thanks for the feedback. I understand the problem with validation triggering on every key stroke. We have come up with a new feature which allows the developer to trigger the validation on blur(and also on focus). This new feature will roll out to production soon
Here are the two apis validateOnFocusOut and validateOnFocusIn.

Does this suffice your need for now? I know this is not triggering the validation on 'Apply' button click but definitely more helpful. Let us know your opinion.

@srideshpande

This comment has been minimized.

Copy link

srideshpande commented May 11, 2017

Hello, @vman - Since I did not hear anything from you, I am closing the issue now. Please feel free to re-open it if you think the issue needs our further attention.

Thanks!

@vman

This comment has been minimized.

Copy link
Contributor Author

vman commented May 11, 2017

Hi @srideshpande sorry I missed your message earlier. Thanks for the reply! I will have a look at it and get back to you on this.

@vman

This comment has been minimized.

Copy link
Contributor Author

vman commented Jul 18, 2017

@srideshpande this works really well now. Great stuff thanks!

@shahjinesh11

This comment has been minimized.

Copy link

shahjinesh11 commented Aug 6, 2018

@srideshpande I want to prepare some my custom code to manage other activities on apply. Can i do that? anything is available to execute on apply button?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.