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

StickyHeaders Header Row does not align when scrolling #7090

Open
objecttothis opened this issue Dec 8, 2023 · 4 comments · Fixed by #7101
Open

StickyHeaders Header Row does not align when scrolling #7090

objecttothis opened this issue Dec 8, 2023 · 4 comments · Fixed by #7101
Labels
Bug Issues which are marked as Bug sticky-header Issues for the sticky-header extension.

Comments

@objecttothis
Copy link

objecttothis commented Dec 8, 2023

Bootstraptable version(s) affected

1.22.1 - 1.23.5

Description

PHP 8.2.12, Bootstrap-table 1.22.1 - 1.23.1

I have StickyHeaders enabled but as soon as you scroll the table, the off-screen portion of the header becomes visible and column alignment is gone.

<script type="text/javascript">
	$(document).ready(function()
	{
		<?= view('partial/bootstrap_tables_locale') ?>

		$('#table')
			.addClass("table-striped")
			.addClass("table-bordered")
			.bootstrapTable({
				columns: <?= transform_headers(esc($headers, 'js'), true, false) ?>,
				stickyHeader: true,
				stickyHeaderOffsetLeft: $('#table').offset().left + 'px',
				stickyHeaderOffsetRight: $('#table').offset().right + 'px',
				pageSize: <?= $config['lines_per_page'] ?>,
				sortable: true,
				showExport: true,
				exportDataType: 'all',
				exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel', 'xlsx', 'pdf'],
				pagination: true,
				showColumns: true,
				data: <?= json_encode(esc($data, 'js')) ?>,
				iconSize: 'sm',
				paginationVAlign: 'bottom',
				escape: false,
				search: true
		});
	});
</script>

Example(s)

In the unSticky position (scroll to the top), everything looks fine.
image

But as soon as you scroll all column alignment is thrown off and the formerly hidden columns become visible
image

This can be seen on the example for sticky headers: https://examples.bootstrap-table.com/#extensions/sticky-header.html both in Edge and Firefox. Untested in Chrome

image

image

Possible Solutions

No response

Additional Context

No response

@objecttothis objecttothis added the Bug Issues which are marked as Bug label Dec 8, 2023
@wenzhixin wenzhixin mentioned this issue Dec 16, 2023
10 tasks
@wenzhixin wenzhixin reopened this Dec 16, 2023
@wenzhixin wenzhixin added the sticky-header Issues for the sticky-header extension. label Jan 13, 2024
@objecttothis
Copy link
Author

@wenzhixin no rush, but I'm curious if you have an estimate for which release we can expect this issue to be addressed in?

@objecttothis
Copy link
Author

objecttothis commented Mar 26, 2024

@wenzhixin can you tell me if this bugfix is on the roadmap or will it be a while still? Tested today with 1.22.4, but it's still an issue.

@objecttothis
Copy link
Author

Still broken in 1.23.5. @wenzhixin is this issue going to be triaged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues which are marked as Bug sticky-header Issues for the sticky-header extension.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants