Why I am getting that error? #455
-
So, this is my simple code which I am running with test_data. I am running it and I am getting: TypeError: can't access property "push", items[bindingsSym] is undefined. I thought that I should use the list just like that.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Could you fix the format of your code? |
Beta Was this translation helpful? Give feedback.
-
Your code has a few bugs. Specifically, for this part: vanX.list(() => div({ id: "table-body" }), r_data.rows, (row, row_deleter, row_index) =>
vanX.list(() => div({ class: "flex border-b text-sm" }), row, (elem, elem_deleter, elem_index) =>
div({
class: `col-${elem_index} p-2 border-r focus:outline-none`,
style: () => `width: ${r_data.columns[row_index].width.val}px`,
contentEditable: true,
textContent: `${row_index}-${elem_index}`,
onblur: (e) => {
r_rows[row_index][elem_index].val = e.target.textContent;
}
})
)
))
Not sure if that fixes all the bugs. But at least the page can load without error. |
Beta Was this translation helpful? Give feedback.
Your code has a few bugs.
Specifically, for this part:
vanX.list(() => div({ class: "flex border-b text-sm" }), row,…