Coder Social home page Coder Social logo

Comments (4)

KevinVandy avatar KevinVandy commented on August 17, 2024

This is most likely a problem with your fetching logic. And since you did not provide a repro, I'm just going to close this.

from material-react-table.

jerlam06 avatar jerlam06 commented on August 17, 2024

@KevinVandy I cannot reproduce it because MRT doesnt seem to work in Stackblitz or Codesandbox:

PS: I am 100% positive it is not coming from my implementation, it only does that with min/max. It is basically adding the filter for min/max with undefined values:
[ { "id": "adjustedPrice", "value": [ undefined, undefined ] }, { "id": "recommendedPrice", "value": [ undefined, undefined ] }, { "id": "currentPrice", "value": [ undefined, undefined ] }, { "id": "brand", "value": [ "ACTION" ] } ]

If the filter value is empty for both min and max, it should be removed from the filter state, right ?

from material-react-table.

KevinVandy avatar KevinVandy commented on August 17, 2024

@jerlam06 It works perfectly fine. You'll just have to mock your own API returns in a sandbox. To make a reproduction, you just have to prove that some state is causing a re-render of some other unrelated state that it is not supposed to.

image

from material-react-table.

jerlam06 avatar jerlam06 commented on August 17, 2024

@KevinVandy Ok thanks. I could reproduce it there => https://stackblitz.com/edit/github-8arb9x?file=src%2FTS.tsx
Open the dev console and trigger show/hide filters, show filters triggers a filter state change for no reason. Plus, the min/max filters remain in the filter state even when empty, this is not consistent I believe.
Thanks in advance, and very good job with the v2, it is amazing :)

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