SOLVED

SPFx Webpart panel properties: stop executing my code until I close you!

Iron Contributor

Maybe I'm missing something?  In classic server-side web parts, users can configure a web part's properties and they aren't applied until the Apply or OK button at the bottom of the property panel is pressed. The new SPFx web part I am building seems to apply the values as soon as any keys are pressed in the property text box.

 

I am building a web part that queries a field in a list and returns and displays all items that match a  property value in the web part.  The idea is that there can be multiple instances of the web part in the site, all getting their data from the same list, but showing different results because each instance is configured with a different query key value.

 

When running in the chrome debugger, I can see that  my code is executing every time I enter each letter. Obviously, nothing is going to be found with a partial key value, so it is useless to go off and query the list every time a new letter is added to the key value. I want to be able to enter the entire value and then "apply" it like I used to be able to, so the code only runs once.

 

Is there a way to do this?

2 Replies

Velin,

 

Thanks much.  Obviously your Google-fu is stronger than mine.

 

 

1 best response