);
} else if (options) {
let current = toStringValue(expression.value);
editor = (
option.label ?? option.value}
isOptionEqualToValue={(a, b) => a.value === b.value}
value={current ? (options.find((option) => option.value === current) ?? { value: current }) : null}
onChange={(_event, selected) => setValue(selected?.value ?? "")}
/>
);
} else {
editor = (
setValue(event.target.value)}
/>
);
}
// Dynamic values are resolved server side, so they can only replace the whole
// value. Pairs would need one toggle per side, which the Windows editor does
// not offer either.
let canToggleDynamic = !readOnly && dynamicValues.length > 0 && arity === "single";
return (