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

Make table headers "Sticky" #405

Open
transistorgrab opened this issue Jul 23, 2023 · 4 comments
Open

Make table headers "Sticky" #405

transistorgrab opened this issue Jul 23, 2023 · 4 comments

Comments

@transistorgrab
Copy link

Hi,

first of all, thank you for this great plugin!

However, I would suggest to make the table header sticky.
By this I mean that the table header should always be visible when scrolling down in the table.
This would making working with the list more comfortable since I always forget which of "Sourced" and "Placed" is which column…

image

@qu1ck
Copy link
Member

qu1ck commented Jul 23, 2023

Making it sticky significantly reduces usable space for the table data on smaller screens like tablets/phones.

You can temporarily remove checkbox column when you don't need it to reduce confusion, it will not lose the checkbox data if you add it back later. Also you can use mark when checked feature to highlight checked column for specific checkbox.

If someone comes up with a way to make the stickiness adaptive to screen size without a lot of code or third party libs I can include it.

@siditm
Copy link

siditm commented Aug 3, 2023

As a crude workaround I've edited two lines in html file:
change <thead id="bomhead"> to <thead id="bomhead" style="position: sticky; top: 0px; z-index: 1;">.

You can also add it to <div style="100%;"> container with reflookup input few lines before, just make sure to then offset <thead> to about top: 60px;.

@qu1ck
Copy link
Member

qu1ck commented Aug 4, 2023

No need to edit the html which you will have to do again after plugin update. Use customization instead, create user.css in web directory with following contents:

#bomhead {
    position: sticky;
    top: 0px;
    z-index: 1;
}

@siditm
Copy link

siditm commented Aug 4, 2023

No need to edit the html which you will have to do again after plugin update. Use customization instead, create user.css in web directory with following contents:

#bomhead {
    position: sticky;
    top: 0px;
    z-index: 1;
}

Thanks, for sure a cleaner solution.

Or even stick reflookup's parent <div> with :

div:has(#reflookup) {  
   position: sticky;  
   top: 0px;  
   z-index: 1;  
}

This will stick search inputs and table headers.

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

3 participants