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

[grid-pro] Custom component edit field (combo box) shows id of selected item before showing the actual value when switching edit #8234

Open
mukherjeesudebi opened this issue Nov 27, 2024 · 3 comments · May be fixed by vaadin/flow-components#6973
Assignees
Labels
BFP Bug fix prioritised by a customer bug Something isn't working Impact: Low Severity: Major UX User experience issue vaadin-grid-pro

Comments

@mukherjeesudebi
Copy link

mukherjeesudebi commented Nov 27, 2024

Description

when selecting from the combo box and switching to next if the network is a little slow then the id of the selected item is visible before the actual value is.

Similar issues:

  1. [grid-pro] Custom component edit fields contains value of previous edited row for a short moment, when switching edit #2550
  2. Tabbing GridPro cells with custom editor emits item property changes flow-components#6816
grid-pro.issue.mp4

Expected outcome

The id should never be shown.

Minimal reproducible example

@Route(value = "grid-pro-custom-editor")
public class GridProCustomEditorPage extends Div {
	public GridProCustomEditorPage() {
        List<Browser> bowsers = new ArrayList<>();

        for (int i = 0; i < 10; i++) {
        	bowsers.add(new Browser("Chrome"));
        }

        GridPro<Browser> grid = new GridPro<>();
        grid.setEditOnClick(true);
        grid.setItems(bowsers);

        ComboBox<String> comboBox = new ComboBox<>();
        comboBox.setItems("Chrome", "Edge", "Firefox", "Safari");
        
        grid.addEditColumn(Browser::getName)
                .custom(comboBox, Browser::setName)
                .setHeader("Name");

        grid.addItemPropertyChangedListener(e -> {
            add(new Div("Item browser changed : " + e.getItem().getName()));
        });

        add(grid);
    }
    
    public static class Browser {
        private String name;

        public Browser(String name) {
            this.name = name;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

    }
}

Steps to reproduce

  1. Add the code to vaadin 24.4.18
  2. Enable network throttling to simulate slow connection
  3. Click a cell to open the custom editor and select from the list of items
  4. Select another item

Environment

Vaadin version(s): 24.4.18

Browsers

No response

@tomivirkki
Copy link
Member

Also referenced here #8232 (comment)

@yuriy-fix yuriy-fix added bug Something isn't working Severity: Major Impact: Low vaadin-grid-pro UX User experience issue labels Nov 28, 2024
@rolfsmeds
Copy link
Contributor

@tomivirkki is there any part of this that won't be addressed by the fixes for #2550 and vaadin/flow-components#6816?

If not, we could probably close this issue as a duplicate.

@tomivirkki
Copy link
Member

We discussed this internally and decided to treat these as separate issues, see #8232 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFP Bug fix prioritised by a customer bug Something isn't working Impact: Low Severity: Major UX User experience issue vaadin-grid-pro
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants