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

Improve overflow hidden on DataTable #2447

Closed
sliekens opened this issue Apr 3, 2017 · 10 comments
Closed

Improve overflow hidden on DataTable #2447

sliekens opened this issue Apr 3, 2017 · 10 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@sliekens
Copy link

sliekens commented Apr 3, 2017

Every DataTable cell hides its overflow by default. Is this really necessary? What kind of content would cause cells to overflow in a bad way?

Same question for the header part of a scrollable table:

.ui-datatable-scrollable-header {
    overflow: hidden;
}

Why would you always want to hide overflow?

I'm asking because I keep running into situations where I need to display controls inside cells that should flow over the cell borders of the DataTable, such as drop-down lists and calendars . The default styling makes this more difficult than it should be.

@thenoen
Copy link

thenoen commented Apr 28, 2017

This is causing problems when I add dropdown filter to header - it is patially hidden behind data rows
image
and when I remove "overflow:hidden"
image

@sliekens
Copy link
Author

I would like to know what problem is solved by hiding overflow. I just don't see it.

@thenoen
Copy link

thenoen commented Apr 28, 2017

"overflow:hidden" is causing problems (first picture). If I change it to "overflow:visible" the dropdown is visible as expected (second picture). After posting tjhis comment I found another github issue with workaround #2368

@sliekens
Copy link
Author

So the question remains: why is "overflow:hidden" the default style? It causes many problems and appears to solve none.

@RebelSyntax
Copy link

Seems like that style is for everything I need to use. Kind of interesting considering later on in the template you have something like this going on for a ui-dropdown-panel class. z-index: 1001? hmmm....what's going on here?
element.style { display: block; visibility: visible; top: 20px; left: 0px; z-index: 1001; opacity: 1; }

@cagataycivici cagataycivici self-assigned this Jun 20, 2017
@cagataycivici cagataycivici added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Jun 20, 2017
@cagataycivici cagataycivici added this to the 4.1.0 milestone Jun 20, 2017
@cagataycivici
Copy link
Member

I'll rethink this for 4.1.0 final, it is only necessary for resizable columns and body of scrollable table, for other cases we can avoid it. Also overlay components have appendTo="body" to avoid this.

@cagataycivici cagataycivici changed the title Q: why hide overflow in DataTable? Evaluate usage of overflow hidden in DataTable Jun 20, 2017
@sliekens
Copy link
Author

Pulling components out of their parent node and appending them to the document root is a lazy workaround for something that can be solved with CSS only. I'm not very knowledgeable about accessibility but I can imagine that moving elements around the DOM like that makes web apps unusable to people who rely on screen readers and such.

@machfalcon
Copy link

We have a need to display a filter dropdown from the header of a table while using resizeble columns and a scrollable table. Hoping this usage can also be handled in the next version.

@cagataycivici
Copy link
Member

@StevenLiekens I see that as a nice addon to enhance flexibility, so that you can customize the component. About overflow, we definitely need scrollable body to be auto to get the scrollbar, for scrollheader header and footer, it has to be hidden so that we can avoid display scrollbar for them.

For regular cells, it makes sense for only resizable columns to be overflow hidden, I'll do this change.

@cagataycivici cagataycivici changed the title Evaluate usage of overflow hidden in DataTable Improve overflow hidden on DataTable Jun 29, 2017
@cagataycivici cagataycivici added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Jun 29, 2017
@dennisward
Copy link

I upgraded to 4.2.1 and the problem seems to still persist... appendTo="body" is still the only solution that I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

6 participants