3

I had created a SPFx web part. The web part contains a Property Pane Custom Field, which returns a string. Now, when I hit apply button on property pane, my custom property gets the data and render it properly. Even doing hard refresh doesn't effect anything on page.

But when I open the same page on a new browser (or clear same browser cache), the value changes to null. While rest of the OOTB properties in property pane retain its data.

I would like to know, where and how SPFx stores property pane value. Also, is there any method we need to call in custom property pane field to preserve its value across browsers?

  • Could you find the answer? If yes kindly share it I am also stuck on it – Student Apr 4 '18 at 20:26
  • Sorry but i didnt got any solution for this. I created the new solution and copy pasted everything. I dont know why, but it worked. – ThinkB4Code Apr 5 '18 at 3:28
0

This kind of behavior usually happens if there is a discrepancy between the property name in your Web Part properties and the property field. For example, if you spelled it differently, uppercase/lowercase, etc.

I've been a victim of this issue several times. Now I double-check that I have spelled everything correctly when I create the property and I don't rename it once it is created :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.