Git Product home page Git Product logo

Comments (7)

nihgwu avatar nihgwu commented on July 17, 2024 1

@Nokecy Yes, but that would be a breaking change, I will figure out a way later

from react-base-table.

nihgwu avatar nihgwu commented on July 17, 2024

I'd say the BaseTable does not data sorting actually, it just uses sortBy to show the SortIndicator, by default it just show the SortIndicator in one column's header, but you could show more via changing the styles

Right now sortBy receives an object instead of an array, but you could save the [sortBy] state on your own, and apply className to the headers via headerClassName

from react-base-table.

Nokecy avatar Nokecy commented on July 17, 2024

I don't quite understand, can you give me a pseudo code?

from react-base-table.

nihgwu avatar nihgwu commented on July 17, 2024

I will add more demos later, including auto size you asked in another thread

from react-base-table.

Nokecy avatar Nokecy commented on July 17, 2024

Thank you!

from react-base-table.

nihgwu avatar nihgwu commented on July 17, 2024

https://autodesk.github.io/react-base-table/examples/multi-sort
seems I should add multi sort in the component instead of style hack

from react-base-table.

Nokecy avatar Nokecy commented on July 17, 2024

const sorting = column.key === sortBy.key;

const sorting = column.key === sortBy[key];

Changing the sortBy type is better like this:
const sortBy= { 'column-0': 'asc', 'column-1': 'desc', 'column-2': 'asc', }

from react-base-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.