Skip to content
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

Fix SelectEditor to ensure new value is flushed before editing stops #3748

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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
Loading