Skip to content

Commit

Permalink
Support multiple dropdowns open
Browse files Browse the repository at this point in the history
  • Loading branch information
rugoncalves committed Nov 7, 2024
1 parent 7f2d528 commit ddb3ceb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Providers/DataGrid/Wijmo/Grid/FlexGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ namespace Providers.DataGrid.Wijmo.Grid {
* @memberof FlexGrid
*/
private _handleListSelection(col: wijmo.grid.Column, editor: HTMLInputElement): void {
const listDropDown = document.querySelector('.wj-grid-listbox');
// When dropdowns are open subsequently, causing to exist multiple dropdowns popups in the DOM.
const listDropDownAll = document.querySelectorAll('.wj-grid-listbox');
// Get the last dropdown popup in the DOM.
const listDropDown = listDropDownAll[listDropDownAll.length - 1];
const listBox = listDropDown ? (wijmo.Control.getControl(listDropDown) as wijmo.input.ListBox) : null;
if (listBox) {
listBox.selectedIndexChanged.addHandler((lbx: wijmo.input.ListBox<unknown>) => {
Expand Down

0 comments on commit ddb3ceb

Please sign in to comment.