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 391 forks source link

Unrendered rows? tui-grid elements that are hidden and then shown have visual issues #1393

Open Nitrodist opened 3 years ago

Nitrodist commented 3 years ago

Describe the bug

When a tui-grid element is hidden and the grid is initialized, the rows within the grid are blank and unusable.

Resizing the window re-renders the rows. That fixes the issue.

If you have the grid initially visible and then hide it, this issue does not happen. It only happens when the div is hidden initially.

To Reproduce Steps to reproduce the behavior:

  1. Wrap a tui-grid enabled div with <div style="visibility: hidden"></div>
  2. Initialize the tui-grid enabled div with javascript: new Grid ...
  3. Remove visibility: hidden
  4. See error

Expected behavior

There is a similar issue in tui-calendar where you can call [.render()](https://nhn.github.io/tui.calendar/latest/Calendar#render). I could call a similar function in my javascript that hides/shows the divs very easily if it existed.

Screenshots

The error happening:

Screen Shot 2021-06-21 at 10 32 52 AM

After resizing the window:

Screen Shot 2021-06-21 at 10 35 17 AM

Desktop (please complete the following information):

js87zz commented 3 years ago

@Nitrodist I checked the issue with our example, but there was no visual issues. 2021-06-23 12-43-17 2021-06-23 12_43_28

Can you give me the more detail information like your configuration code or DOM structure?

youalreadydid commented 1 year ago

you need to call refreshLayout when the parent is visible again