Skip to content

Internal column definition value _filterFn never changes #425

Open

Description

@rossmeredith

mantine-react-table version

2.0.0-beta.7

react & react-dom versions

18.3.1

Describe the bug and the steps to reproduce it

I'm calling onSelectFilterMode below with my own filter names (right near the bottom of the provided screenshot). However it seems buggy. Upon closer inspection it seems internally this api method does not update state if the value hasn't changed. This makes sense except the previous value is read from columnDef._filterFn which never changes in my case, it is always "contains" which is the initial value (to check I'm logging to the console the value, just before making the state update call).

image

...Looking through the library code I can't see anywhere this internal value ever changes except for in prepareColumns which is presumably only called as part of initializing state.

Minimal, Reproducible Example - (Optional, but Recommended)

N/A

Screenshots or Videos (Optional)

N/A

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Activity

  1. alessandrojcm commented on Dec 10, 2024

    @alessandrojcm
    Collaborator

    Could you post a repro please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions