TanStackT
TanStackโ€ข3y agoโ€ข
6 replies
progressive-amaranth

Filter table by more than one column

Hi everyone, I'm looking to filter an existing table by more than one column. At the moment I have the following Input component that filters the table by the UPN column:

<Input
  placeholder='Filter by UPN'
  value={(table.getColumn('upn')?.getFilterValue() as string) ?? ''}
  onChange={event => table.getColumn('upn')?.setFilterValue(event.target.value)}
  className='max-w-sm'
/>


Ideally I'd like to add another column to filter by for this, is this something that could be simply done? Thanks ๐Ÿ™‚
Was this page helpful?