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

Table header is always visible when scrolling #918

Closed
OmlineEditor opened this issue Mar 17, 2025 · 7 comments
Closed

Table header is always visible when scrolling #918

OmlineEditor opened this issue Mar 17, 2025 · 7 comments

Comments

@OmlineEditor
Copy link
Contributor

if the table contains a lot of similar data and the table is very large, it is desirable to always see the table header.

there is a plugin but it does not work in the new version
https://github.com/jnvsor/adminer-table-header-scroll/

Is it possible to improve the work with large tables by making the table header always visible?

@vrana
Copy link
Owner

vrana commented Mar 17, 2025

I've sent pull requests to all the plugins to add the namespace (jnvsor/adminer-table-header-scroll#2) so this one is now compatible.

I've considered making the header sticky in the past but there were issues with some browsers. I'll try it again.

@icyz
Copy link

icyz commented Mar 17, 2025

That plugin needed to be changed to Adminer 5:

If you need: https://github.com/icyz/adminer/blob/master/plugins/table-header-scroll.php

@OmlineEditor
Copy link
Contributor Author

I've considered making the header sticky in the past but there were issues with some browsers. I'll try it again.

if possible add this plugin inside the default source code, it is a useful plugin and I think everyone should use it for convenience.

@mesaros
Copy link
Contributor

mesaros commented Mar 17, 2025

Is a plugin needed? It's elegantly solved using CSS - design by rmSOFT ;)
It works on all web browsers I know...

@jnvsor
Copy link
Contributor

jnvsor commented Mar 17, 2025

@mesaros it didn't when I made it.

You can solve it with your own CSS (And probably should do so in themes since the offset may vary by theme) but I'm going to update it to work with adminer 4/5 so it'll still work.

@OmlineEditor can you try jnvsor/adminer-table-header-scroll#3 and see how it works?

@vrana
Copy link
Owner

vrana commented Mar 18, 2025

It was more complicated than it seemed to be. When I just added position: sticky, the borders really disappeared or there was a 1px gap at the top where the contents below was visible. I've tried top: -1px; which removed the gap but it looked ugly without the border. According to https://stackoverflow.com/a/53559396/783580, sticky is not compatible with border-collapse: collapse so I've changed it to separate and changed the borders construction. I've updated the designs broken by this and also added proper top where applicable.

vrana added a commit that referenced this issue Mar 18, 2025
@vrana vrana closed this as completed in 29f9540 Mar 18, 2025
@OmlineEditor
Copy link
Contributor Author

can you try jnvsor/adminer-table-header-scroll#3 and see how it works?

after persistent alterations, after deleting everything and again the installation started working for me, but it is better for me not to suffer like that and wait until the main version has a header scroll. and it seems that now it has been done. thank you.

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

5 participants