✅ Officially supported ✅
⚠️ Not officially supported, expect warnings ⚠️
☣️ Not officially supported, expect warnings and errors ☣️
✅ Officially supported ✅
⚠️ Not officially supported, but "should work" ⚠️
Since at least version 5.0.3 of react-data-grid, I get deprecation warnings for every use of the ReactDataGrid for using the deprecated enableRowSelect and rowScrollTimeout props, without me ever using them. I think it was caused by #1254.
Call in my code:
<ReactDataGrid
onGridSort={this.handleGridSort}
columns={this.state.columns}
rowGetter={this.rowGetter}
rowsCount={this.getSize()}
minHeight={currContainerHeight-4}
onColumnResize={this.onColumnResize}
headerRowHeight={headerRowHeight} />
Two warnings show up in my console:
> enableRowSelect has been deprecated and will be removed in a future version. Please use rowSelection instead
> undefined
Other deprecated props like onRowUpdated don't show a warning, so I suspect it's got something to do with the defaultProps of enableRowSelect and rowScrollTimeout. The package react-is-deprecated has a closed issue on this, the defaultProps are passed through the propTypes as well so the deprecationWarning will trigger.
The warning message for rowScrollTimeout only has undefined as text because it's propType definition is missing the deprecationWarning() call, but that's another story.
I didn't digg deep enough into react-data-grid yet to see if just removing the 2 defaultProps will cause any side effects, in my case it worked.
Thanks!
PS: Is React 15.4 still the only officially supported version?
Same messages here!
+1
+1
+1 in @bentley/ui-components
Using react-data-grid 6.0.1. Please fix in 6.0.2.
+1 using 5.03
+1 using latest
+1 using
"react-data-grid": "^6.0.2-0",
"react-data-grid-addons": "^6.0.2-0",
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.
hay stale bot "react-data-grid": "^6.1.0-0", still has this issue. PR is seems like ready to fix it though.
looks like they're actively working on a new major release which i'm sure will include this PR -> https://github.com/adazzle/react-data-grid/commits/next
doubt they will include this as part of a minor release before then but I could be wrong
+1 using 6.1.0
+1 using
"react-data-grid": "^6.1.0",
"react-data-grid-addons": "^6.1.0",
Awesome that y'all are sorting out console warnings (^^,)
Workaround:
Set prop 'enableRowSelect' to null :
<ReactDataGrid
columns={this.state.columns}
rowGetter={this.rowGetter}
rowsCount={this.getSize()}
enableRowSelect={null}
/>
The warning @ElmarFrerichs mentions :
undefined
is still there, no idea what that is.
@ryanakallis
Workaround:
Set prop 'enableRowSelect' to null
Same workaround clears the other undefined caused by rowScrollTimeout as @ElmarFrerichs suspected
```
enableRowSelect={null}
rowScrollTimeout={null}
/>
Edit to include version info:
"react": "^16.8.6",
"react-data-grid": "^6.1.0",
"react-data-grid-addons": "^6.1.0",
```
Still a valid workaround for suppressing deprecated prop warnings.
yup still happening by default at
"react": "^16.8.6",
"react-data-grid": "^6.1.0",
"react-data-grid-addons": "^6.1.0",
@m1tttt4 solution will break current types definitions with \
Error:(127, 11) TS2322: Type 'null' is not assignable to type 'boolean | "single" | "multi" | undefined'.
Resolved in version 7.0.0-alpha.18, I'll reopen it if it happens again.
Most helpful comment
@ryanakallis
Same workaround clears the other undefined caused by rowScrollTimeout as @ElmarFrerichs suspected
```
...
enableRowSelect={null}
rowScrollTimeout={null}
/>
"react": "^16.8.6",
"react-data-grid": "^6.1.0",
"react-data-grid-addons": "^6.1.0",
```
Still a valid workaround for suppressing deprecated prop warnings.