In my settings index.jsx file I have a toggle that when it is set to true, it enables a select setting in which the user can then select up to 3 items. What I need to do i when the toggle is set to false, to not only disable the select setting, but clear any items that may have been selected. I am trying to use prop.settingsStorage.removeItem. Here is my code. Any help is appreciated.
<Toggle
settingsKey="toggle"
label="This is a Toggle"
onchange={() => props.settingsStorage.removeItem(selector)}
/>
<Select
label={`MultiSelector:`}
multiple
settingsKey="selector"
options={[
{name:"item1"},
{name:"item2"},
{name:"item3"},
]}
disabled={!(props.settings.toggle === "true")}
/>
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.