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

Editable table returns focus to the previous row after selecting field in the next row using tab #2712

Open
Flaurite opened this issue Feb 18, 2020 · 6 comments
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@Flaurite
Copy link
Contributor

Flaurite commented Feb 18, 2020

Environment

Description of the bug or enhancement

See Russian support forum: thread

First case:

  1. Edit field in the row
  2. Try to select next field in the row using tab

AR
Next field is not focused.

First case

firstcase

Second case

  1. Edit field in the row
  2. Try to select field in the next row using tab key

AR
Prevoius row is focused

Second case

secondcase

@Flaurite Flaurite added this to the Release 7.2 milestone Feb 18, 2020
@Flaurite Flaurite assigned t1-cuba and Flaurite and unassigned t1-cuba Feb 18, 2020
@Flaurite
Copy link
Contributor Author

Flaurite commented Feb 20, 2020

Reproduced in 7.1 version too.

@bekonti
Copy link

bekonti commented Dec 13, 2021

Excuse me
is it fixed? if fixed, please tell me in which version
P.S. I am Using ext.cubaVersion = '7.1.1'

@Flaurite
Copy link
Contributor Author

Hi @bekonti ,

Most likely the issue won't be fixed. See discussion and workaround here: https://forum.cuba-platform.com/t/editable-table-wrong-focus-fw-7/9274/8. The workaround is to use generated columns with labels for non-editable columns:

@Inject
private MetadataTools metadataTools;

@Subscribe
public void onInit(InitEvent event) {
    for (Table.Column<Customer> column : customersTable.getColumns()) {
        if (!column.isEditable()) {
            column.setColumnGenerator(customer -> {
                Object value = customer.getValueEx(column.getIdString());
                return new Table.PlainTextCell(metadataTools.format(value));
            });
        }
    }
}

@bekonti
Copy link

bekonti commented Dec 13, 2021

@Flaurite Thanks for quick reply🤗
Unfortunately code you send me doesn't help

@Flaurite
Copy link
Contributor Author

@bekonti could you share a small demo project where the problem is reproduced?

@bekonti
Copy link

bekonti commented Dec 13, 2021

@Flaurite I've got same problem which exists in the Sampler
https://demo10.cuba-platform.com/sampler/#main/15/sample?id=editable-table

small Demo in progress...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants