Hi There,
Been struggling for a bit with programmatically disabling options within a checkboxGroup
. I checked out this somewhat related thread but don't think it quite addresses what I'm hoping to do.
Essentially I am sending users through a user flow twice (in two connected apps, with the relevant data stored in localStorage
) where they can answer with progressively narrow options. I would like to disable the options that they did not select in the first checkboxGroup
. I have simple code set up in a query to create a boolean array for whether that particular option should be disabled.
const firstSelection = localStorage.values.Size;
const allOptions = ["<5", "5-49", "50-249", "250+"];
// Map through the defaultOptions to check whether each is NOT in passthroughVars
const constructedBoolArray = allOptions.map(option => !firstSelection.includes(option));
return constructedBoolArray;
However, there do not seem to be any methods to set individual options to disabled - seemingly just the entire checkboxGroup through setDisable()
.
I've tried doing this directly within each option's "Disabled" option, but I can't find any information on how I could passthrough the individual option's value
as an additional scope to programmatically set it to disabled or not.
Hoping someone can provide some advice or feedback on what I might be doing wrong here (or letting me know if this is impossible currently within Retool).
Thanks!