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

Bug: Issues adjusting table size when rows are expanded #206

Open
rscheuer opened this issue Mar 19, 2024 · 0 comments
Open

Bug: Issues adjusting table size when rows are expanded #206

rscheuer opened this issue Mar 19, 2024 · 0 comments

Comments

@rscheuer
Copy link

I'm using the addExpandedRows plugin and would like the pageSize to reflect the new length of a given page when expanded. The problem I'm trying to solve is when expanding a row near the bottom of a table, the expanded rows get cut off and shift to the next page. Each of these sub-rows also have sub-rows, so the table can get a bit confusing once all rows are expanded.

I have this simple function that runs when a row is expanded:

.on('expand', () => {
	let rowData = row.original;
	fetchData(rowData.id, rowData.type);
	isExpanded.set(true);
	$pageSize = $pageSize + length;
})

This works great on the first page of the table, but breaks when on any subsequent page. Since all previous pages get resized, the currently expanding row gets shifted up, potentially back to the previous page which is the same issue as before in the opposite direction.

It would be very helpful to have fine-tuned control over a specific page's length or add built-in support to the addExpandedRows functionality to handle resizes when expanding sub-rows.

@rscheuer rscheuer changed the title Issues adjusting table size when rows are expanded Bug: Issues adjusting table size when rows are expanded Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant