react-spreadsheet icon indicating copy to clipboard operation
react-spreadsheet copied to clipboard

Dependent Dropdown Cells

Open rjvim opened this issue 2 years ago • 0 comments

I am using 0.7.7 version.

I have done experiments with DataEditor and DataViewer and could write custom components very easily.

I have the following use case:

  • In a single row
  • There are three cells -> State, District, and City
  • All three are select dropdowns
  • Districts are dependent on State, and Cities are dependent on District
  • When a State is changed, I want to empty the selected District - for which I can use the data prop, and Data Viewer displays new content
  • But, when the user wants to Select the District, I need to filter all districts and show only those districts which are in the State which is selected; for this, all I need to know is which State is selected.

I checked the properties of DataEditor, and it doesn't get the current data.

The other way to put the problem is when DataEditor is called, is it possible to get data of another cell other than the cell passed to DataEditor as props?

rjvim avatar Sep 21 '22 06:09 rjvim