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

TreeGrid with DetailHandler broken #11288

Closed
sarahfuchs opened this issue Nov 2, 2018 · 6 comments
Closed

TreeGrid with DetailHandler broken #11288

sarahfuchs opened this issue Nov 2, 2018 · 6 comments
Assignees
Labels
Milestone

Comments

@sarahfuchs
Copy link

sarahfuchs commented Nov 2, 2018

  • Vaadin Framework version 8.6.0

  • Browser version all Browsers, currently working with Chrome Version 70.0.3538.77 (64-bit)

  • Web container name and version Apache Tomcat Version 9.0.8

  • Description of the bug Combination of TreeGrid with a DetailHandler is broken. Initially the grid looks fine. But as soon as the tree grid collapses a row, the details are listet at wrong position, and row hight is sometimes faulty too.

  • Expected behavior: If a group of rows is collapsed, that part is hidden and the remaining rows move up to use the grid space. After collapsing and expanding rows, the grid should look the same.

  • Actual behavior
    If you collapse and expand the detail handler, the position is faulty.

  • Minimal reproducible example

      TreeGrid<Class> classGrid = new TreeGrid<Class>();
    
      TreeData<Class> treeData = ((TreeDataProvider<Class>) classGrid.getDataProvider()).getTreeData();
      classGrid.addColumn(row -> row.getSimpleName()).setId("simpleName");
      classGrid.setDetailsGenerator(row -> new Label("details for " + row.getSimpleName()));
      
      treeData.clear();
      Class listClazz = List.class;
      treeData.addItem(null, listClazz);
      Class arrayListClazz = ArrayList.class;
      treeData.addItem(listClazz, arrayListClazz);
      classGrid.expand(listClazz);
      
      Class setClazz = Set.class;
      treeData.addItem(null, setClazz);
      Class hashSetClazz = HashSet.class;
      treeData.addItem(setClazz, hashSetClazz);
      classGrid.expand(setClazz);
      
      classGrid.setDetailsVisible(listClazz, true);
      classGrid.setDetailsVisible(arrayListClazz, true);
      classGrid.setDetailsVisible(setClazz, true);
      classGrid.setDetailsVisible(hashSetClazz, true);
    
      return classGrid;
    }
    
@sarahfuchs
Copy link
Author

initial-grid
grid-after-collapse-expand

@TatuLund
Copy link
Contributor

TatuLund commented Nov 2, 2018

Your description is very similar to a Grid bug #11139 that should have been fixed by this #11154

@sarahfuchs
Copy link
Author

If it has been fixed, its not working for vaadin 8.6.0.
Please try the example code and see for yourself.

@anasmi anasmi added the BFP label Nov 6, 2018
@strxetics
Copy link

strxetics commented Nov 6, 2018

I also still have the same issues in the grid in 8.6.0 as described here #11139

@ZheSun88
Copy link
Contributor

currently shipped with 8.9.0.beta3.
final release will be in two weeks.

@sarahfuchs
Copy link
Author

Its working great now!
Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants