Topic: MDBDatatable
Petr Urban pro premium priority asked 2 years ago
Expected behavior It should be possible to populate table with zeros in the first row.
Actual behavior I'm getting the following error in console and the table is not shown:
[Vue warn]: Unhandled error during execution of mounted hook at at at at at at ... > at at runtime-core.esm-bundler.js:41:12 Uncaught (in promise) TypeError: row.forEach is not a function getGeneratedRows MDBDatatable.vue:456 getGeneratedRows MDBDatatable.vue:454 getDataFromProps MDBDatatable.vue:581 setup MDBDatatable.vue:389 node_modules chunk-6DK54HCS.js:8733 callWithErrorHandling runtime-core.esm-bundler.js:158 callWithAsyncErrorHandling runtime-core.esm-bundler.js:166 __weh runtime-core.esm-bundler.js:2655 flushPostFlushCbs runtime-core.esm-bundler.js:325 flushJobs runtime-core.esm-bundler.js:363 promise callback*queueFlush runtime-core.esm-bundler.js:270 queueJob runtime-core.esm-bundler.js:264 reload runtime-core.esm-bundler.js:464 tryWrap runtime-core.esm-bundler.js:494 TestCaseReport.vue:229 accept client.ts:542 fetchUpdate client.ts:459 queueUpdate client.ts:306 queueUpdate client.ts:306 handleMessage client.ts:159 handleMessage client.ts:157 setupWebSocket client.ts:90 setupWebSocket client.ts:89 client.ts:67 MDBDatatable.vue:456:10
Resources (screenshots, code snippets etc.)
The following are my data:
setup(props) {
const searchData = ref("");
const allRecords = {
columns: [
{label: "Errors Count", field: "nr_errors"},
{label: "Transaction Number", field: "transaction_number"},
{label: "Actual Transaction Number", field: "actual_transaction_number"},
{label: "Value Date", field: "value_date"},
{label: "Type", field: "type"},
{label: "Amount", field: "amount"}
],
rows: [
{
nr_errors: 0,
transaction_number: "$t2",
actual_transaction_number: 8719,
value_date: "2023-02-01",
type: "Principal",
amount: "-1043210.1100"
},
{
nr_errors: 0,
transaction_number: "$t2",
actual_transaction_number: 8720,
value_date: "2023-02-01",
type: "Coupon",
amount: "30416.6700"
}]
}
return {
searchData,
allRecords
};
},
Am I doing something wrong? The column Error Count should be first because of the user is checking results of some testing.
Thanks for any tip/help.
BR, Petr
Bartosz Cylwik staff answered 2 years ago
Hi, thank you for reporting this issue. We already have this issue added to our to-fix list. It's going to be fixed in the next release. Right now when 0 is present in the first column, the app will crash. 0's in other columns should work properly: https://mdbootstrap.com/snippets/vue/b-cylwik/5361975#js-tab-view
Sorry for the inconvenience. Best Regards!
Petr Urban pro premium priority commented a year ago
Dear MDB, any news about fixing this issue with zeros in first column? Thanks!
BR, Petr
Bartosz Cylwik staff commented a year ago
Hello, we are working on the fixes. Unfortunately, we can't provide an ETA at the moment. Best Regards!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Vue
- MDB Version: MDB5 4.0.0
- Device: MACBook
- Browser: Safari
- OS: MacOS Ventura
- Provided sample code: No
- Provided link: No