Skip to content

Commit 3d2a697

Browse files
Add auto-close on selection for item picker modal in single-selection mode
When selectionMode is 'single', clicking an item now immediately submits and closes the modal, providing a streamlined UX. Multiple selection mode continues to require explicit confirmation via the confirm button. This improves the user experience for profile-picker and context-picker components when used in single-item mode, as users no longer need to click an additional "Close" button after selecting an item. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent fac58fd commit 3d2a697

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Umbraco.Ai/src/Umbraco.Ai.Web.StaticAssets/Client/src/core/modals/item-picker/item-picker-modal.element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export class UaiItemPickerModalElement extends UmbModalBaseElement<
6868
// Single selection - submit immediately
6969
this.updateValue({ selection: [item] });
7070
this.modalContext?.dispatchEvent(new UaiSelectedEvent(item.value, item));
71+
this._submitModal();
7172
}
7273
}
7374

0 commit comments

Comments
 (0)