Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show/Hide Column Option is empty #172

Open
1 task done
masterbater opened this issue Oct 19, 2023 · 4 comments
Open
1 task done

Show/Hide Column Option is empty #172

masterbater opened this issue Oct 19, 2023 · 4 comments
Labels
V1 Issue with MRT V1

Comments

@masterbater
Copy link

masterbater commented Oct 19, 2023

mantine-react-table version

v1.3.3

react & react-dom versions

18

Describe the bug and the steps to reproduce it

All columns show up in the table, only the show column, hide column popover doesnt show up the options. I need to click reset order so that all the options and will show up. I use spread operator in merging columns, some filters are async, it needs to wait for it. Turns those columns that is not hardcoded wont show up in the popover options
image

Minimal, Reproducible Example - (Optional, but Recommended)

image

Screenshots or Videos (Optional)

No response

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

None

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.
@masterbater
Copy link
Author

I resolve it by doing this

  useEffect(() => {
    table.setColumnOrder(getDefaultColumnOrderIds(table.options as any));
  }, [columns]);

@alessandrojcm alessandrojcm added the V1 Issue with MRT V1 label Dec 9, 2023
@alessandrojcm
Copy link
Collaborator

Hi there, could you please post a minimal reproduction? It's not quite clear to me what is it that you are trying to accomplish here.

@KevinVandy
Copy link
Owner

If you have dynamic defined columns, you also must provide columnOrder state

@jsykesdev
Copy link

jsykesdev commented Apr 14, 2024

This will happen if you have a column definition with a Header (uppercase) defined without a header ( lowercase ) defined. At least in my experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V1 Issue with MRT V1
Projects
None yet
Development

No branches or pull requests

4 participants