Elementui reports an error. Cannot read property ‘setcheckedkeys’ of undefined“
Click the tree node and execute the following code. An error will be reported because the DOM element is not loaded
handleRowClick(row) {
this.$refs.tree.setCheckedKeys(ids);
},
Correct writing:
handleRowClick(row) {
this.$nextTick(() => {
this.$refs.tree.setCheckedKeys(ids);
})
},
Read More:
- Cannot read property ‘isFile‘ of undefined [How to Solve]
- Vue cannot read property ‘xxx’ of undefined solutions
- [Solved] Vue element UI form verification error: cannot read property ‘validate’ of undefined
- [Solved] Syntax Error: TypeError: Cannot read property ‘parseComponent‘ of undefined
- [Solved] HBuilder Error: Cannot read property ‘forceUpdate‘ of undefined
- Uni-app Error when assigning a value to a component: [system] TypeError: Cannot read property ‘name‘ of undefined
- [Solved] Syntax Error: TypeError: Cannot read property ‘parseComponent‘ of undefined
- [Solved] electron Error: Uncaught TypeError: Cannot read property ‘BrowserWindow‘ of undefined
- [Solved] TYPEERROR: CANNOT READ PROPERTY ‘REDUCE‘ OF UNDEFINED
- [Solved] vue.esm.js?efeb:591 [Vue warn]: Error in event handler for “click“: “TypeError: Cannot read property
- [Solved] Echarts Error: Cannot read property ‘init‘ of undefined
- [Solved] Install The Latest Version of Jest Error: TypeError: Cannot read property ‘instrument‘ of undefined
- [Solved] Vue Error: TypeError: Cannot read property ‘end‘ of undefined
- Echarts Partially introduced error: TypeError: Cannot read property ‘findAxisModel’ of undefined
- Echarts Map Error: Error: Invalid geoJson format Cannot read property ‘length‘ of undefined
- [Solved] Error in v-on handler “TypeError Cannot read properties of undefined (reading ‘resetFields‘)“
- [Solved] JS Error: cannot set property xxx of undefined
- [Solved] Syntax Error: TypeError: Cannot set property ‘parent‘ of undefined
- [Solved] Uni.createintersectionobserver Error: Uncaught TypeError: Cannot read property ‘bottom’ of null
- [Solved] Element form method Error: TypeError: Cannot read properties of undefined (reading ‘resetFields’)