pnp / sp-dev-fx-property-controls

Reusable SPFx property pane controls - Open source initiative
https://pnp.github.io/sp-dev-fx-property-controls/
MIT License
235 stars 150 forks source link

PropertyFieldCollectionData field defaultValue is undefined when set "isVisible: () => false" #612

Open vishalshitole opened 5 months ago

vishalshitole commented 5 months ago

Category

Version

Please specify what version of the library you are using: [ 3.16.0 ]

Question

How do I set the "isVisible" property of one of the field in PropertyFieldCollectionData?

Observed Behavior

When I set the field property isVisible to false to hide it from the collection grid, its defaultValue is undefined. However, when isVisible is not set to false, defaultValue gets set to expected value. Eve when "disable" property is set to true.

Steps to Reproduce

My field in the PropertyFieldCollectionData looks like below.

image

Am I doing anything wrong here? Please suggest.

Thanks!