inovua / reactdatagrid

Empower Your Data with the best React Data Grid there is

Home Page:https://reactdatagrid.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamic Method of Disabling Rows

DCMattyG opened this issue · comments

I've been exploring using the disabledRows parameter for React Data Grid. A shortcoming that requires quite a bit of additional coding to work around is when rows are sorted/reordered. It would be much nicer to have a disabled flag in the row props that you could pass into the Data Grid instead of defining a static list.

  • what edition are you using - community
  • version for @inovua/reactdatagrid-community - v5.10.2

What you did:

  • Used the disabledRows prop on the Data Grid
  • Sorted by a particular column
  • Observed that the disabled rows do not follow the row ID and the incorrect rows become disabled

Problem description:

  • The disabledRows prop is too static for something as dynamic as a Data Grid

Suggested solution:

  • Add a disabled prop to the row data to allow rows to be dynamically marked as disabled
  • This will allow data to be pre-processed to determine which rows should indeed be disabled and maintain the appropriate disabled rows upon sorting

I hope the above ask is clear, thank you so much for the consideration!