T
TanStack3y ago
grumpy-cyan

Example Table in Vue with Filtering?

Hello! I'm trying to make a table with filtering in Vue and am running into issues. An example project would be great to look at! The following is my ColumnFiltering.vue file
<template>
<input
type="text"
:value="columnFilterValue ?? ''"
placeholder="Search..."
@input="(value) => column.setFilterValue(value)"
/>
</template>

<script setup lang="ts">
import { Column, Table } from "@tanstack/vue-table";

const props = defineProps<{
column: Column<any>;
table: Table<any>;
}>();

const columnFilterValue = props.column.getFilterValue();
</script>
<template>
<input
type="text"
:value="columnFilterValue ?? ''"
placeholder="Search..."
@input="(value) => column.setFilterValue(value)"
/>
</template>

<script setup lang="ts">
import { Column, Table } from "@tanstack/vue-table";

const props = defineProps<{
column: Column<any>;
table: Table<any>;
}>();

const columnFilterValue = props.column.getFilterValue();
</script>
I'm getting errors such as Uncaught (in promise) TypeError: _table$getState$colum.find is not a function
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?