4

table plugin https://github.com/tannerlinsley/react-table

how i can filter my column with select box ? eg:

i have column and there is just two name Name 1 Name 2

I want to put selectbox to column for select and filtering my NAME 1 or NAME 2 entries.

{Header: 'Owner',accessor: 'name', headerClassName: 'wordwrap', Filter: ({ filter, onChange }) =>
        <select
          onChange={event => onChange(event.target.value)}
          style={{ width: "100%" }}
          value={filter ? filter.value : "all"}
        >
          <option value="all">Show All</option>
          <option value="true">Name 1</option>
          <option value="false">Name 2</option>
        </select>
        },

I found in example something and implemented to my code. But I don't know how put options from my accessor

user3348410
  • 2,733
  • 10
  • 51
  • 85

0 Answers0