-
-
Notifications
You must be signed in to change notification settings - Fork 532
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 sticky header #2293
Table sticky header #2293
Conversation
Oh, that's fine if I fucked up. :P I'll take a look when I have the time. Taking a quick look at commit changes:
Isn't header cells height configurable? That's why I used js. |
The fixed height is just for testing purposes. I plan to make it dynamic. Probably the same as your approach with JS. |
Hello @stsrki, This damn feature does look easier then it actually is, goddamn!
I was thinking... tables don't have the resize feature like in datagrid, and in retrospective since datagrid uses table behind the scenes, maybe the feature could have been implemented in the table and be available in both, eitherway I was thinking if this is gonna mesh well with it or not, in theory it should still work exactly the same. Not sure if the same is worth doing for the
As for the code itself, I see you've borrowed some of the stuff I had done. But you're applying your codebase patterns better then I was. :) So looks good to me overall. |
I agree it is not perfect still, and with the new demo, it is easier to compare results. But I think even with some minor border issues it should be ready to merge. If we get complaints later on we can come back and fix it. I don't want to lose too much time on this anymore 😠 Just need to implement dynamic row height with JS. Adding a new table-height parameter might be a good idea. I will add it and it will be used for both sticky and non-sticky mode. Making |
Oh I wasn't complaining about it affecting performance. I was saying that you forgot to do it for ContainerClassBuilder it is not refreshing on parameters change. |
JS calculation added now! It's working without any issue as far as I can see. One thing I'm not sure about is, do we need to call We'll see. For now, it seems OK. |
I'm guessing we would have to do something similar to Dirty() so it only recalculates at the right times. |
Yep, but we'll not optimize too prematurely. Just need to make it work for now. |
I just now understood this message 🤦♂️. It might just be a great idea to have it directly on the Table. I don't think it would be hard to move it. Good catch! |
Based on work from #2214 because it was easier for me to create a separate PR than to refactor the existing. The problem with 2214 PR is that it was changing a lot of table styles and so borderless, stripped, etc would not work.
In this PR I have implemented a working example for Boostrap and Bulma. Other providers will be done soon. Styles changing is kept to a minimum.
@David-Moreira I must admit doing this is a lot harder than anticipated. So far this is the only example with CSS that was working for me. I even considered JavaScript but we'll see, maybe it is not needed. When you have some time please test it. I will continue with work in the meantime. Thanks!