react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

grid-template-rows not updating after add a new row

Open vine1993 opened this issue 2 years ago • 4 comments

Describe the bug

I'm using a simple array state to store my rows, I have a modal window that creates a new row to the grid, but when I do that the grid-template-rows under the grid don't update the repeat to the new length, this causes the UI to break. image image

To Reproduce

  1. Create a simple state const [data, setData] = useState([])
  2. Try to insert a new row to this state

Environment

  • react-data-grid version: 7.0.0-beta.12
  • react/react-dom version: 16.14.0 / 16.11.0

vine1993 avatar Jul 20 '22 23:07 vine1993

met the same image

szatpig avatar Sep 15 '22 04:09 szatpig

Possible duplicate of: https://github.com/adazzle/react-data-grid/issues/2956

chirayuchiripal avatar Sep 23 '22 16:09 chirayuchiripal

Can you create a reproducible example? Also make sure you are not mutating rows and creating a new array instead.

amanmahajan7 avatar Sep 23 '22 19:09 amanmahajan7

Any solution to this. I'm trying to implement the Master-detail Grid and I would love to be able to add or delete rows at the Master Level.

PopeyeSailorMike avatar Sep 25 '22 20:09 PopeyeSailorMike