Does no onChange work with these components? I try to open a dialog box on photoshop using react, javascript and UXP. I can not get the value of the selected menu item. How can I achieve this? @Karmalakas
const DialogContent = ({dialog}) => {
return (
<>
<sp-picker label="Label">
<sp-label slot="label">Please select a reason</sp-label>
<sp-menu slot="options" onChange={handleSelection}>
<sp-menu-item value="value1" selected={true}>{options.item1}</sp-menu-item>
<sp-menu-item value="value2">{options.item2}</sp-menu-item>
<sp-menu-item value="value3">{options.item3}</sp-menu-item>
<sp-menu-item value="value4">{options.item4}</sp-menu-item>
</sp-menu>
</sp-picker>
<sp-footer>
<sp-button onClick={() => dialog.close()}>Close</sp-button>
</sp-footer>
</>
);
}