Autoselect value in GridPro not working

When using custom edit component (BigDecimalField) with GridPro, autoselect is not working as expected. Sometimes it autoselects value inside field, sometimes it doesn’t. What can I do, to achieve autoselect effect? I am placing grid inside Dialog.
Here is simple example:

`BigDecimalField field = new BigDecimalField();

GridPro gridTest = new GridPro<>();
gridTest.addEditColumn(i → i)
.custom(field, (item, value) → { });
gridTest.setItems(Arrays.asList(BigDecimal.valueOf(1.23), BigDecimal.valueOf(2.34), BigDecimal.valueOf(3.4567)));`

I am using Vaadin 14+

Hmm, you shouldn’t need autoselect on the field at all – the value should be selected regardless in GridPro. Works that way in V24 at least.

here’s without setAutoSelect in V24

Yes it works same way regardless of autoselect. It looks nice in v24 :slightly_smiling_face: … but in 14.9.2 im having this strange behaviour … maybe something in custom styles :thinking:

seems like it recognizes a single click to the number field if you click on where the field appears on double click. Because if you click outside where the field appears it does autoselect correct.

Can you log the clicks in a way to see if it recognizes 3 clicks instead of 2?

I need it to work like in builtIn text editor … grid must be editOnClick … im not sure if i understand what you want to see … anyway here is recording

it does not autoselect on first click, which it should

I will try with fresh project to see if my styles interfere in any way with grids functionality

it might be that custom editors just don’t behave the same in V14. Unfortuantely I don’t have a V14 app to test with at the moment.

I tried with 14.10.2 from … it works the same way :frowning_with_open_mouth:

I just tested v24 and no problem there :S

Seems like a V14-specific issue then. You can create a ticket about it, but be aware that V14 is not proactively maintained except for security and other critical issues, so it will have very low priority unless prioritized through Warranty (Prime & Enterprise subscribers) or explicit paid-for development.

looks like we will need to migrate to v24 … btw how did you managed to remove padding/margin of custom edit field in your screen recording? For me, a click on a row increases its height because of that padding

the DOM structure is a bit different in V24, in a way that avoids that growing

but i tried v24 and it is growing there too … at least with start project from

:thinking: that I can’t explain