File tree Expand file tree Collapse file tree
packages/ra-ui-materialui/src/list/datagrid Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -403,3 +403,14 @@ export const ErrorInFetch = () => (
403403 </ ListContextProvider >
404404 </ MemoryRouter >
405405) ;
406+
407+ export const RowClickFalse = ( ) => (
408+ < Wrapper >
409+ < Datagrid rowClick = { false } >
410+ < TextField source = "id" />
411+ < TextField source = "title" />
412+ < TextField source = "author" />
413+ < TextField source = "year" />
414+ </ Datagrid >
415+ </ Wrapper >
416+ ) ;
Original file line number Diff line number Diff line change @@ -309,7 +309,12 @@ Datagrid.propTypes = {
309309 onSelect : PropTypes . func ,
310310 onToggleItem : PropTypes . func ,
311311 resource : PropTypes . string ,
312- rowClick : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . func ] ) ,
312+ // @ts -ignore
313+ rowClick : PropTypes . oneOfType ( [
314+ PropTypes . string ,
315+ PropTypes . func ,
316+ PropTypes . bool ,
317+ ] ) ,
313318 rowStyle : PropTypes . func ,
314319 selectedIds : PropTypes . arrayOf ( PropTypes . any ) ,
315320 setSort : PropTypes . func ,
Original file line number Diff line number Diff line change @@ -73,7 +73,12 @@ DatagridBody.propTypes = {
7373 onToggleItem : PropTypes . func ,
7474 resource : PropTypes . string ,
7575 row : PropTypes . element ,
76- rowClick : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . func ] ) ,
76+ // @ts -ignore
77+ rowClick : PropTypes . oneOfType ( [
78+ PropTypes . string ,
79+ PropTypes . func ,
80+ PropTypes . bool ,
81+ ] ) ,
7782 rowStyle : PropTypes . func ,
7883 selectedIds : PropTypes . arrayOf ( PropTypes . any ) ,
7984 styles : PropTypes . object ,
Original file line number Diff line number Diff line change @@ -241,7 +241,11 @@ DatagridRow.propTypes = {
241241 record : PropTypes . object ,
242242 resource : PropTypes . string ,
243243 // @ts -ignore
244- rowClick : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . func ] ) ,
244+ rowClick : PropTypes . oneOfType ( [
245+ PropTypes . string ,
246+ PropTypes . func ,
247+ PropTypes . bool ,
248+ ] ) ,
245249 selected : PropTypes . bool ,
246250 style : PropTypes . object ,
247251 selectable : PropTypes . bool ,
You can’t perform that action at this time.
0 commit comments