Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.0
-
None
Description
I get the TypeError: Cannot call method 'index' of null when I try to get the table view index. Funny thing is that the code is behaving correctly on 6.8.2. Here is the attached code, while below is the excerpt where the error is reported.
However, if instead of the TableView.view I call the actual id of the TableView (contactsView in this case), then the code works as expected.
Furthermore, the same thing is happening if I use the the table model from c++, so I think that the problem is not related to the TableModel from Qt.labs.qmlmodels.
Am I missing something? Am I doing something wrong? What changed from 6.8.2 to 6.9.0 to cause this problem?
(code: tv_problem.qml)
TableView.onCommit:
Unknown macro: { let index = TableView.view.index(row, column) contactsModel.setData(index, "display", text) }