You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**positionCreatingRow: 'top' ** is been ignored. Always go to bottom of the last page.
Even when you use a button to create row.
renderTopToolbarCustomActions: ({ table }) => (
<Button
variant="contained"
onClick={() => {
table.setCreatingRow(true); //simplest way to open the create row modal with no default values
//or you can pass in a row object to set default values with the createRow helper function
// table.setCreatingRow(
// createRow(table, {
// //optionally pass in default values for the new row, useful for nested data or other complex scenarios
// }),
// );
}}
>
Create New User
),
BTW how do get the current row a user is on. or last row... use was on.
Minimal, Reproducible Example - (Optional, but Recommended)
renderTopToolbarCustomActions: ({ table }) => (
<Button
variant="contained"
onClick={() => {
table.setCreatingRow(true); //simplest way to open the create row modal with no default values
//or you can pass in a row object to set default values with the createRow helper function
// table.setCreatingRow(
// createRow(table, {
// //optionally pass in default values for the new row, useful for nested data or other complex scenarios
// }),
// );
}}
>
Create New User
),
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms
I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
The text was updated successfully, but these errors were encountered:
material-react-table version
2.8.0
react & react-dom versions
18.2.0
Describe the bug and the steps to reproduce it
**positionCreatingRow: 'top' ** is been ignored. Always go to bottom of the last page.
Even when you use a button to create row.
renderTopToolbarCustomActions: ({ table }) => (
<Button
variant="contained"
onClick={() => {
table.setCreatingRow(true); //simplest way to open the create row modal with no default values
//or you can pass in a row object to set default values with the
createRow
helper function// table.setCreatingRow(
// createRow(table, {
// //optionally pass in default values for the new row, useful for nested data or other complex scenarios
// }),
// );
}}
>
Create New User
),
BTW how do get the current row a user is on. or last row... use was on.
Even if you use the example.
https://www.material-react-table.com/docs/examples/editing-crud
set positionCreatingRow: 'top' it is ignored and always add new row to the bottom of the last page.
Minimal, Reproducible Example - (Optional, but Recommended)
renderTopToolbarCustomActions: ({ table }) => (
<Button
variant="contained"
onClick={() => {
table.setCreatingRow(true); //simplest way to open the create row modal with no default values
//or you can pass in a row object to set default values with the
createRow
helper function// table.setCreatingRow(
// createRow(table, {
// //optionally pass in default values for the new row, useful for nested data or other complex scenarios
// }),
// );
}}
>
Create New User
),
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms
The text was updated successfully, but these errors were encountered: