Ref is undefined when used in render #9184
Unanswered
chennyang
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
const columnFilterRef = ref([]);
list.forEach((item) => {
let son = document.createElement('div');
const itemRef = ref();
render(
h(ColumnFilter, {
ref: itemRef, //I debug it value is alse undefined
ref_for: true,
data: [root]
}),
son
);
$(
#${tableId.value} thead tr th:nth(${item})
).append(son);columnFilterRef.value.push(itemRef);
});
console.log(columnFilterRef.value)
0: RefImpl {__v_isShallow: false, dep: undefined, __v_isRef: true, _rawValue: undefined, _value: undefined}
1: RefImpl {__v_isShallow: false, dep: undefined, __v_isRef: true, _rawValue: undefined, _value: undefined}
2: RefImpl {__v_isShallow: false, dep: undefined, __v_isRef: true, _rawValue: undefined, _value: undefined}
3: RefImpl {__v_isShallow: false, dep: undefined, __v_isRef: true, _rawValue: undefined, _value: undefined}
I want to call the function of ColumnFilter,why columnFilterRef is undefined?
Beta Was this translation helpful? Give feedback.
All reactions