-
Notifications
You must be signed in to change notification settings - Fork 658
dropdownbox demo improvements #31816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 25_2
Are you sure you want to change the base?
dropdownbox demo improvements #31816
Conversation
Co-authored-by: Copilot <[email protected]> Signed-off-by: DuckTieCorpMember <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes issues in the DropDownBox Single Selection demo across multiple frameworks (Angular, Vue, React, ReactJs, jQuery). The main improvement ensures that single selection works correctly by extracting only the first selected key from the TreeView's selection array, and properly closing the dropdown when selections are made.
Key Changes:
- Modified TreeView selection handlers to extract a single value from the selected keys array instead of passing the entire array
- Moved dropdown closing logic from
onItemClickhandlers tosyncTreeViewSelectionor value change handlers - Added
defer-rendering="false"to Vue TreeView DropDownBox to ensure initial selection displays correctly - Cleaned up Angular implementation by replacing
onOptionChangedhandlers with direct selection change handlers
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| jQuery/index.js | Extracts single value from selected keys array for TreeView selection |
| Vue/App.vue | Adds defer-rendering, changes value from array to single value, moves close logic to syncTreeViewSelection, removes onItemClick handler |
| ReactJs/App.js | Extracts single value from selected keys, moves close logic to syncTreeViewSelection, removes onTreeItemClick handler |
| React/App.tsx | Extracts single value from selected keys, moves close logic to syncTreeViewSelection, removes onTreeItemClick handler, renames handlers for clarity |
| Angular/app.component.ts | Extracts single value from selected keys, adds dataGrid selection handler, removes onOptionChanged handlers |
| Angular/app.component.html | Removes onOptionChanged handlers, replaces two-way binding with one-way binding and event handler for DataGrid |
This PR Fixes DropDownBox - Single Selection demo
Angular: DropDownBox now closes when selection is changed for the first time.
Vue: TreeView displays a selected node when you open an editor for the first time.