Comments (5)
Am I missing something? It seems like the version is correct. I took it from the official example: https://tanstack.com/table/v8/docs/framework/react/examples/column-dnd
from table.
Sorry, closing v7 issues. The version you listed does not match the code sandbox
from table.
I have the same problem with v8, did you solve it?
from table.
@mgryal No, I did not.
@KevinVandy Could you please take a look again, the bug is in the v8
.
from table.
@nurbek-mirai I think I found something. Instead of mapping the column IDs, try this.
function getColumns(column: any) {
if (column.columns) {
return column.columns.map(getColumns) as string[];
}
return (column.id as string) || (column.accessorKey as string);
}
function getColumnsId(columns) {
const columnsArray = [];
columns?.forEach((column) => {
const columnsId = getColumns(column);
if (typeof columnsId == 'string') columnsArray.push(columnsId);
else columnsArray.push(...columnsId);
});
console.log(columnsArray);
return columnsArray;
}
And replace the columnOrder state
const [columnOrder, setColumnOrder] = React.useState<string[]>(() =>
getColumnsId(columns)
);
It's only for two levels of header grouping, but you can extrapolate the code.
from table.
Related Issues (20)
- your website is down HOT 6
- useQwikTable undefined sorting handlers [QwikCity} HOT 2
- Maximum update depth exceeded when hide virtualize table
- how to allow only table to expand one row at a time HOT 2
- Angular Table Column Filters and Column Grouping Examples not working HOT 3
- Does React 18 work with v6? HOT 1
- `Infinity` is not supported for pageSize HOT 2
- Table doesnโt re-render with new React Compiler + React 19 HOT 5
- multiple rendering useReactTable hook with nextjs14 HOT 1
- My website
- Angular Column Ordering example does not work
- Grouping by not using subRows HOT 2
- Updating a useQuery with a key crashes using React Table HOT 1
- cell.getIsAggregated should not check for zero length subrows HOT 2
- `autoResetPageIndex` seems to be default true when `manualPagination=true`, is not expectd as docs saying HOT 1
- Unexpected behavior of array filterFns (arrIncludes, arrIncludesAll, arrIncludesSome) HOT 1
- Table v8 expanding - incorrect state of parent checkbox when selecting subrows
- `getTopRows()` and `getBottomRows()` Not Referentially Stable Between Renders
- Calling `row.getParentRow()` with expanded, filtered row models and initial filtering value throws an error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from table.