mantine-react-table icon indicating copy to clipboard operation
mantine-react-table copied to clipboard

Show/Hide Column Option is empty

Open masterbater opened this issue 2 years ago • 4 comments

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

  • [X] 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 avatar Oct 19 '23 08:10 masterbater

I resolve it by doing this

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

masterbater avatar Oct 19 '23 09:10 masterbater

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.

alessandrojcm avatar Jan 03 '24 16:01 alessandrojcm

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

KevinVandy avatar Jan 03 '24 16:01 KevinVandy

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

jsykesdev avatar Apr 14 '24 22:04 jsykesdev