I'm using Primereact Datatable and trying to add column toggle to my table. However, the table is editable and it just doesn't work with column toggle. My guess is that <MultiSelect> has some problem with it, or I might have missed something? I have created a sample code with codesandbox below:
https://codesandbox.io/s/primereact-dat ... -bug-3fxho
Any help would be greatly appreciated!
Column Toggle doesn't work if table is editable
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
Sorry for the delayed response! Please try;
Best Regards,
Sorry for the delayed response! Please try;
Code: Select all
<MultiSelect
value={selectedColumns}
options={columns}
optionLabel="field"
dataKey="field"
onChange={onColumnToggle}
selectedItemTemplate={(val) => val ? val.field + ' ' : ' '}
style={{ width: "250px" }}
/>
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 23 guests