nhn / tui.grid

🍞🔡 The Powerful Component to Display and Edit Data. Experience the Ultimate Data Transformer!
http://ui.toast.com/tui-grid/
MIT License
2.42k stars 398 forks source link

child row problems #325

Open ray007 opened 5 years ago

ray007 commented 5 years ago

Version

Version 3.5.0 as required by @toast-ui/vue-grid installed with npm.

Development Environment

Windows 10, current google chrome

Current Behavior

I'm using the grid with the tree-options.

Problem 1: child rows count for even-odd classes even when the parent is collapsed Expanding/collapsing nodes does not seem to update even/odd classes either. This is not optimal with the striped theme.

Problem 2: child rows are sorted as if they were normal rows and not kept below their parent.

dongwoo-kim commented 5 years ago

Thanks for reporting this. I think both problems are bugs. Problem 1 seems easy to fix, so we will make a patch for it soon. But Problem 2 is little bit tricky to fix and as we've been currently focusing on the major update (v4), it will take long to be fixed.

ray007 commented 5 years ago

Problem 1 is easy to fix by not setting css-classes on row but using

tr:nth-child(even) {}
tr:nth-child(odd) {}

I will also try to take a look at sorting when I find the time. Especially since I'd also like to have multi-column sorting...

dongwoo-kim commented 5 years ago

I'd thought that using CSS would be the solution for the Problem 1, but it turned out not to work because we are using virtual-scrolling. It's a bit tricky to calculate actual order of the visible rows with consideration of the virtual-scrolling and collapsed state. Sorry for the delay, but we're gonna fix this after the major update.