Skip to content

Commit

Permalink
Fix SelectEditor to ensure new value is flushed before editing stops (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
saba-mo authored Aug 7, 2024
1 parent 71eab90 commit 2cab9e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
* New `XH.genUUID()` method to generate UUIDs for use as Correlation IDs or elsewhere.
* `GridModel` will now accept `false` as a value to omit context menus.

### 🐞 Bug Fixes

* Fixed `SelectEditor` to ensure new value is flushed before editing stops.

### ⚙️ Technical

* Remove context menus from column choosers.
Expand Down
5 changes: 4 additions & 1 deletion desktop/cmp/grid/editors/SelectEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import {hoistCmp} from '@xh/hoist/core';
import {select, SelectProps} from '@xh/hoist/desktop/cmp/input';
import '@xh/hoist/desktop/register';
import {wait} from '@xh/hoist/promise';
import {EditorProps} from './EditorProps';
import './Editors.scss';
import {useInlineEditorModel} from './impl/InlineEditorModel';
Expand All @@ -26,7 +27,9 @@ export const [SelectEditor, selectEditor] = hoistCmp.withFactory<SelectEditorPro
hideDropdownIndicator: true,
hideSelectedOptionCheck: true,
selectOnFocus: false,
onCommit: flushOnCommit ? () => props.agParams.stopEditing() : null,
onCommit: flushOnCommit
? () => wait().then(() => props.agParams.stopEditing())
: null,
rsOptions: {
styles: {
menu: styles => ({
Expand Down

0 comments on commit 2cab9e9

Please sign in to comment.