no data when display none
See original GitHub issueHi, when my rows.length == 0
I show a message that “there isn’t data” and I hide <datatable>
using .hiddenWhenNoData{display:none;}
but when data exist I remove this class and datatable exist but rows aren’t displayed, when I begin to scroll rows are displayed.
Here’s gif:
Here’s Plunker:
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
display none if null using data-id - javascript
My frist idea: Loop the content list items and when no .content is available inside, remove the related menu item.
Read more >display - CSS: Cascading Style Sheets - MDN Web Docs
none. Turns off the display of an element so that it has no effect on layout (the document is rendered as though the...
Read more >CSS display attribute value changes/resets on page switch
Using "style=display:none;" for the rows is not standard for Datatables and Datatales does not know about these hidden rows.
Read more >The Key Difference Between Display: None and Visibility
When you set the display property for any given element to none , the element in question will not be rendered, so it...
Read more >Places it's tempting to use `display: none;`, but don't
As for not tabs and keyboard access, this won't really help out screenreader users. Display:none is bad practice, it's a shame jQuery and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am encountering this problem. I have two tables and hide one while the other is displayed and toggle between them. If the data changes in a table that is hidden, when the containing div becomes visible the table displays the same behavior shown above. I don’t know how to fix it.
Use
visiblility:hidden
instead. Its because it has to calculate the page size based on the height and since its not 0/0 its not shown.We actually have a directive that polls for visibility, I’d look in that to see why thats not working - https://github.com/swimlane/angular2-data-table/blob/master/src/directives/visibility.directive.ts