diff --git a/CHANGELOG.md b/CHANGELOG.md index ab8baacd7..eb4a3e454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ * `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. diff --git a/desktop/cmp/grid/editors/SelectEditor.ts b/desktop/cmp/grid/editors/SelectEditor.ts index 03493bf1f..7253bef69 100644 --- a/desktop/cmp/grid/editors/SelectEditor.ts +++ b/desktop/cmp/grid/editors/SelectEditor.ts @@ -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'; @@ -26,7 +27,9 @@ export const [SelectEditor, selectEditor] = hoistCmp.withFactory props.agParams.stopEditing() : null, + onCommit: flushOnCommit + ? () => wait().then(() => props.agParams.stopEditing()) + : null, rsOptions: { styles: { menu: styles => ({