fix filter search posto and remove console log parsedUser

This commit is contained in:
Wikzyy
2025-03-18 15:11:03 +07:00
parent 1127c2c05f
commit 25cb7aae89
4 changed files with 13 additions and 11 deletions

View File

@ -17,9 +17,9 @@ const ListToolbar = () => {
<input
type="text"
placeholder="Search Postu"
value={(table.getColumn('PostoAdms_name')?.getFilterValue() as string) ?? ''}
value={(table.getColumn('name')?.getFilterValue() as string) ?? ''}
onChange={(event) =>
table.getColumn('PostoAdms_name')?.setFilterValue(event.target.value)
table.getColumn('name')?.setFilterValue(event.target.value)
}
/>
</label>

View File

@ -84,9 +84,9 @@ const ManagePostoAdmsContextProvider = ({ children }: { children: React.ReactNod
const columns = useMemo<ColumnDef<any>[]>(
() => [
{
// accessorFn: (row) => row.PostoAdms_id,
// id: 'PostoAdms_id',
accessorKey: 'PostoAdms_id',
accessorFn: (row) => row.PostoAdms_id,
id: 'id',
// accessorKey: 'PostoAdms_id',
header: ({ column }) => <DataGridColumnHeader title="ID" column={column} />,
enableSorting: true,
enableHiding: false,
@ -95,9 +95,9 @@ const ManagePostoAdmsContextProvider = ({ children }: { children: React.ReactNod
}
},
{
// accessorFn: (row) => row.posto_adms_name,
// id: 'posto_adms_name',
accessorKey: 'PostoAdms_name',
accessorFn: (row) => row.PostoAdms_name,
id: 'name',
// accessorKey: 'PostoAdms_name',
header: ({ column }) => (
<DataGridColumnHeader title="Posto Administrativo Name" column={column} />
),