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

[Feature requests] Table scroll #52

Open
goodseller opened this issue Oct 21, 2015 · 7 comments
Open

[Feature requests] Table scroll #52

goodseller opened this issue Oct 21, 2015 · 7 comments

Comments

@goodseller
Copy link

Does anyone know how to make it works?

I have tried a few times but currently things turn like this:

https://gyazo.com/b9a4e0eb2f57f0d134e59397a8833fdf

But I am hoping something like this:

https://gyazo.com/b927e0227f2a6acec39c35aeb9df1392

http://jsfiddle.net/TweNm/

Here is some workarounds (I can not make it work as it said): http://stackoverflow.com/questions/17067294/html-table-with-100-width-with-vertical-scroll-inside-tbody

Thanks.

@goodseller goodseller changed the title Feature requests: Table scroll [Feature requests] Table scroll Oct 21, 2015
@developit
Copy link
Contributor

It's not possible via CSS without breaking the table's automatic column widths.

Here's the closest I could get, but it requires a width:
http://jsfiddle.net/developit/sdvuu1nx/

@goodseller
Copy link
Author

It looks good with the above hacks.

Seem it needs to apply the width attribute to all element or it will breaks as content changes.

http://jsfiddle.net/66yca1re/

@goodseller
Copy link
Author

I found another issue:

http://jsfiddle.net/m9jbxn3a/

Seems js is a must to do so.

@developit
Copy link
Contributor

@goodseller / @connors one useful outcome here could be adding support for using the table styles on non-table nodes. This is obviously possibly by passing Photon through a preprocessor, but it could be use to "export" the styles as .table, .table-row, etc. Tables can be useful for showing tabular data, but there are just a lot of cases where they stop working even though data is still very much tabular.

For example: http://jsfiddle.net/developit/j8swt8zb/ (scroll-list)

@connors
Copy link
Owner

connors commented Oct 31, 2015

@developit Yeah that might be a solution. We might even be able to use position: sticky to acheive the desired effect on table headings. I'll look into it.

@connors connors added the css label Oct 31, 2015
@developit
Copy link
Contributor

Sounds promising. I actually ended up rolling with the separate header table solution, but ran into more general issues with tables being unweildly to work with, so I'm probably switching to a static or flexbox layout to get around automatic column widths.

@bradparks
Copy link

any more on this? I think having a sticky table header is a must for real apps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants