flow-components icon indicating copy to clipboard operation
flow-components copied to clipboard

GridPro: Enable edit mode in custom editors with keypress

Open OlliTietavainenVaadin opened this issue 1 year ago • 1 comments

Describe your motivation

The built-in GridPro editors allow you to start typing, which is a nice UX. Currently, you can't do this with custom editors; you need to double-click or press enter to start editing.

Describe the solution you'd like

It should be possible to start typing to enter the values regardless of editor type.

Describe alternatives you've considered

The behavior (old "requires doubleclick or enter" / new "just start typing") could be configurable? Not sure who would prefer the old one, though.

Additional context

Related issue: https://github.com/vaadin/flow-components/issues/2185

The web component has hardcoded keydown listener logic: https://github.com/vaadin/web-components/blob/e4f1628417f2fdbd5bd3b95e98822a6728a95603/packages/grid-pro/src/vaadin-grid-pro-inline-editing-mixin.js#L110-L112 And then the type passed to _enterEditFromEvent is checked here https://github.com/vaadin/web-components/blob/e4f1628417f2fdbd5bd3b95e98822a6728a95603/packages/grid-pro/src/vaadin-grid-pro-inline-editing-mixin.js#L283-L285

OlliTietavainenVaadin avatar Jan 11 '24 09:01 OlliTietavainenVaadin

Also related/duplicate https://github.com/vaadin/web-components/issues/2536

TatuLund avatar Feb 11 '25 11:02 TatuLund