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

feat(Table): add vertical alignment #91

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Vladeeg
Copy link

@Vladeeg Vladeeg commented Dec 13, 2024

This PR adds vertical alignment for table body rows just like in the uikit's table: https://preview.gravity-ui.com/uikit/?path=/story/components-data-display-table--default.

As for my investigation, horizontal alignment requires many wrappers for tanstack's types, so I suggest to implement it in another PR

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@Vladeeg
Copy link
Author

Vladeeg commented Dec 16, 2024

Also it might be a good idea to make verticalAlign: 'top' default?

src/components/Table/Table.scss Outdated Show resolved Hide resolved
Comment on lines 43 to 54
&_vertical-align {
&_top {
vertical-align: top;
}

&_center {
vertical-align: middle;
}

&_bottom {
vertical-align: bottom;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vertical-align won't help in case of enabled virtualization due to display: flex style

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I was suspecting something might go wrong with virtualization, I'll look into it

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

Successfully merging this pull request may close these issues.

3 participants