KevinVandy / mantine-react-table

A fully featured Mantine V5 implementation of TanStack React Table V8, forked from Material React Table
https://www.mantine-react-table.com/
MIT License
840 stars 141 forks source link

Cannot add custom keys to the localization object without type errors #423

Open rossmeredith opened 3 days ago

rossmeredith commented 3 days ago

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

It's simple.

If you add a custom key it shows a type error - "Object literal may only specify known properties ..."

How can I overcome this problem?


// e.g.

    localization: {
      ...MRT_Localization_EN,
      'exact': 'Exact'
    },

Minimal, Reproducible Example - (Optional, but Recommended)

N/A

Screenshots or Videos (Optional)

Screenshot 2024-10-20 103218

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

No, because I do not know how

Terms

alessandrojcm commented 3 days ago

What's your use case here? This is meant to replace strings in MRT components, if you need a new string you should probably add it to a custom component.

rossmeredith commented 2 days ago

Thanks for responding.

Specifically this is the use case at the moment. I want to add my own filters.

image

rossmeredith commented 2 days ago

I suppose I could work around this but doesn't it make sense for all translations to be in the same localization object?