TriStateCheckbox is used to select either "true", "false" or "null" as the value. But my API returns boolean and undefined types, and changing this in the API is unfeasible, so the TriStateCheckbox doesn't work correctly.
how can i get around this situation?
TriStateCheckbox does not accept undefined types
solve this problem as follows:
Code: Select all
const variable = ref<boolean | null>(null);
// "props.filter" is a filter class of my api
watch(() => variable.value, () => {
props.filter.variable = variable.value == null ? undefined : variable.value;
}, { deep: true });
-
- Posts: 560
- Joined: 23 Oct 2020, 09:28
Hi,
Sorry for the late answer. It might be core issue. If problem is still persist, could you please create an issue on Github?
Sorry for the late answer. It might be core issue. If problem is still persist, could you please create an issue on Github?
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests