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
I'm learning how to use material-table and react, new with both. I'm not sure if its a bug or I'm doing something wrong but boths things works fine separatedly. With localization I was able to correctly rename the Actions column and with editable I was able to correctly edit, add or remove rows (I just copy the example).
When I use both things together i just get a white screen. After inspect with google chrome i found this errors
Uncaught TypeError: Cannot read property 'addTooltip' of undefined
at MaterialTable.getProps (material-table.js:473)
at new MaterialTable (material-table.js:363)
at constructClassInstance (react-dom.development.js:14303)
at updateClassComponent (react-dom.development.js:18355)
at beginWork$1 (react-dom.development.js:20085)
at HTMLUnknownElement.callCallback (react-dom.development.js:363)
at Object.invokeGuardedCallbackDev (react-dom.development.js:412)
at invokeGuardedCallback (react-dom.development.js:465)
at beginWork$$1 (react-dom.development.js:25711)
at performUnitOfWork (react-dom.development.js:24619)
at workLoopSync (react-dom.development.js:24592)
at performSyncWorkOnRoot (react-dom.development.js:24153)
at react-dom.development.js:12313
at unstable_runWithPriority (scheduler.development.js:818)
at runWithPriority$2 (react-dom.development.js:12259)
at flushSyncCallbackQueueImpl (react-dom.development.js:12308)
at flushSyncCallbackQueue (react-dom.development.js:12296)
at discreteUpdates$1 (react-dom.development.js:24334)
at discreteUpdates (react-dom.development.js:1485)
at dispatchDiscreteEvent (react-dom.development.js:5949)
index.js:1375 The above error occurred in the component:
in MaterialTable
in Unknown (created by WithStyles(Component))
in WithStyles(Component) (at UsersTable.js:28)
in UsersTable (at Patients.js:13)
in main (created by ForwardRef(Container))
in ForwardRef(Container) (created by WithStyles(ForwardRef(Container)))
in WithStyles(ForwardRef(Container)) (at Patients.js:10)
in Patients (at Body.js:15)
in main (created by ForwardRef(Container))
in ForwardRef(Container) (created by WithStyles(ForwardRef(Container)))
in WithStyles(ForwardRef(Container)) (at Body.js:12)
in Home (at App.js:12)
in div (at App.js:10)
in App (at src/index.js:7)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
Uncaught TypeError: Cannot read property 'addTooltip' of undefined
at MaterialTable.getProps (material-table.js:473)
at new MaterialTable (material-table.js:363)
at constructClassInstance (react-dom.development.js:14303)
at updateClassComponent (react-dom.development.js:18355)
at beginWork$1 (react-dom.development.js:20085)
at HTMLUnknownElement.callCallback (react-dom.development.js:363)
at Object.invokeGuardedCallbackDev (react-dom.development.js:412)
at invokeGuardedCallback (react-dom.development.js:465)
at beginWork$$1 (react-dom.development.js:25711)
at performUnitOfWork (react-dom.development.js:24619)
at workLoopSync (react-dom.development.js:24592)
at performSyncWorkOnRoot (react-dom.development.js:24153)
at react-dom.development.js:12313
at unstable_runWithPriority (scheduler.development.js:818)
at runWithPriority$2 (react-dom.development.js:12259)
at flushSyncCallbackQueueImpl (react-dom.development.js:12308)
at flushSyncCallbackQueue (react-dom.development.js:12296)
at discreteUpdates$1 (react-dom.development.js:24334)
at discreteUpdates (react-dom.development.js:1485)
at dispatchDiscreteEvent (react-dom.development.js:5949)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
I'm learning how to use material-table and react, new with both. I'm not sure if its a bug or I'm doing something wrong but boths things works fine separatedly. With localization I was able to correctly rename the Actions column and with editable I was able to correctly edit, add or remove rows (I just copy the example).
When I use both things together i just get a white screen. After inspect with google chrome i found this errors
This is my table
<MaterialTable
options={{
search: true
}}
title="Pacientes"
columns={state.columns}
data={state.data}
editable={{
onRowAdd: newData =>
new Promise(resolve => {
setTimeout(() => {
resolve();
const data = [...state.data];
data.push(newData);
setState({ ...state, data });
}, 600);
}),
onRowUpdate: (newData, oldData) =>
new Promise(resolve => {
setTimeout(() => {
resolve();
const data = [...state.data];
data[data.indexOf(oldData)] = newData;
setState({ ...state, data });
}, 600);
}),
onRowDelete: oldData =>
new Promise(resolve => {
setTimeout(() => {
resolve();
const data = [...state.data];
data.splice(data.indexOf(oldData), 1);
setState({ ...state, data });
}, 600);
}),
}}
actions={[
{
icon: 'assignment',
tooltip: 'Actividades',
onClick: (event, rowData) => {
// Do save operation
}
},
]}
components={{
Toolbar: props => (
<div style={{ backgroundColor: '#e8eaf5' }}>
<MTableToolbar {...props} />
),
}}
localization={{
header: {
actions: 'Acciones',
}
}}
/>
The text was updated successfully, but these errors were encountered: