You can make use of a standard boolean check to determine whether your toggle component has value. Based on that, you can show/hide your slider component. You can do this bool check in the getPropertyPaneConfiguration method itself as below. Here, if the toggle component is off, we will show an emptly label.
protected getPropertyPaneConfiguration(): ...
You can do this by calling the open() method of the Property Pane which can be accessed via the web part's context property:
You can call it on a button click event and it will open the property pane without manually opening the page in edit mode.
In REST, booleans (YesNo choice) fields should be set as 0/1 i.e 0 for No and 1 for yes.
So, you can use the below sample code. We will first check if the checkbox is checked. If it is checked, will set the value in our code to 1, if unchecked will set it to 0 and after that will add/update our list item. Please use the internal columns names for this ...
Yeah, no good option available right now to close the property pane via API.
But then you can use document.querySelector to find the close button element and then programmatically trigger the click event.
You can modify from below sample code:
var element = document.querySelector("button[class*='...
This kind of behaviour can happen if you use DOM manipulation in your web part (e.g.: find an element by CSS class or I'd and change its attributes) to display the data.
What happens is the last web part to load results overrides all elements in the page, including the ones from the other web parts, essentially overwriting every web part to display ...
If we're talking about an SPFx custom web part, you can defined a web part property but do not create a Property Pane Field for it. Thus, you'll be able to set it programmatically and users won't be able to modify it via UI.
Normally, every PropertyPane contructor takes as first parameter the variable it will use to store the data.
So your this.properties object should contain any of the variables you declared. I'm not sure if you actually said and tested this object ?
If you wish to be able to alter the number or the type of fields displayed in the WebPart Property Pane, you need to change the code in the <webpart-name>WebPart.ts file in the protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration method. Instead of returning a static JS Object, you can put whatever logic you want to return a different ...
I had similiar issue with the FabricUI:Dialog. The CSS will be overwritten or ignored. I ended up to use a "normal" css file and overwrite the css in the "traditional" way ;-)
Add a normal css file to your project (e.g. propertyPane.css under /components)
Add your CSS without the Class-Wrapper
font-size: /* you have to use normal ...