File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 969969 placeholder={t('items.selectOrCreateLabels') || 'Select or create labels...'}
970970 disabled={!canEdit || !isSystemFieldEditable('labels')}
971971 onSelect={savePersonalLabels}
972+ onClose={() => (editingPersonalLabels = false)}
972973 onCancel={() => (editingPersonalLabels = false)}
973974 />
974975 </div>
Original file line number Diff line number Diff line change 7272
7373 // Event callbacks
7474 onOpen = () => {},
75+ onClose = () => {},
7576 onSelect = () => {},
7677 onCancel = () => {},
7778 onChange = () => {}
347348 }
348349 }
349350
350- // Handle dropdown close without selection (single-select only)
351+ // Notify callers whenever the dropdown closes. Preserve the legacy
352+ // single-select cancellation callback for closes without a selection.
351353 let wasOpen = $state (false );
352354 $effect (() => {
353- if (wasOpen && ! $open && ! $selected && ! multiple) {
354- onCancel ();
355+ if (wasOpen && ! $open) {
356+ onClose ();
357+ if (! $selected && ! multiple) {
358+ onCancel ();
359+ }
355360 }
356361 if (! wasOpen && $open) {
357362 highlightedIndex = 0 ;
Original file line number Diff line number Diff line change 2323 labels: providedLabels = null ,
2424 loading: providedLoading = false ,
2525 onOpen = null ,
26+ onClose = null ,
2627 onSelect = () => {},
2728 onCancel = () => {}
2829 } = $props ();
153154 getValue= {(label ) => label? .id }
154155 getLabel= {(label ) => label? .name ?? ' ' }
155156 onOpen= {() => onOpen? .()}
157+ onClose= {() => onClose? .()}
156158 onChange= {handleChange}
157159 onCancel= {handleCancel}
158160>
You can’t perform that action at this time.
0 commit comments