Giter Site home page Giter Site logo

Comments (2)

tannerlinsley avatar tannerlinsley commented on August 18, 2024 1

React-Table, in it's current form, gives you the api to achieve this on your own, but you will need to implement your own UI and filtering methods. Try the following:

  1. Pass your own react component to the header field for your column. In that component you can implement any type of UI that you want for filtering: select, string input, multi-select, or even react-select
  2. You will need to create and populate any options for the column UI from the original dataset (before filtering it)
  3. When your column's filter state changes, apply that filter state the original dataset using something like https://github.com/kentcdodds/match-sorter or https://lodash.com/docs/4.17.4#filter
  4. Pass the new filtered array to react-table

Although this is a common use-case for a datagrid, react-table's approach is not to include all of the functionality in the core of the package, but to provide the api/extension model to accomplish it.

from table.

twheys avatar twheys commented on August 18, 2024

Ok, I will consider creating an extension then. Thanks for the suggestions.

from table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.