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
We've created a crud datatable just like this example, but when removing data via REST API, with below message:
Cause
The error is from this line of code, and should be due to the arguments passed into the function resolveFieldData(data, field) - data is an empty object, field is a nested property, which cause the error by accessing the nested properties of an empty object.
Suggestion / Solution
Maybe it's necessary to check if the value of data is an empty object. Tried to update this line of code to if (Object.values(data).length && field) {
and the error is gone.
Not sure if this update will affect other parts of this package, if not, please help update the checking of the value of data in this case. Thank you.
The text was updated successfully, but these errors were encountered:
cagataycivici
changed the title
DataTable - error when removing data via REST API
Error with empty objects
Nov 25, 2020
cagataycivici
added
the
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
label
Nov 25, 2020
We've created a crud datatable just like this example, but when removing data via REST API, with below message:
Cause
The error is from this line of code, and should be due to the arguments passed into the function resolveFieldData(data, field) - data is an empty object, field is a nested property, which cause the error by accessing the nested properties of an empty object.
Suggestion / Solution
Maybe it's necessary to check if the value of data is an empty object. Tried to update this line of code to
if (Object.values(data).length && field) {
and the error is gone.
Not sure if this update will affect other parts of this package, if not, please help update the checking of the value of data in this case. Thank you.
The text was updated successfully, but these errors were encountered: