You need to sign in to do that
Don't have an account?
ephwvan
<lightning:datatable> - action columns menu is "cut" by the bottom of table
Hi, did anyone experince the following problem when working with <lightning:datatable>? (see images below). If menu window covers rows in grid, there is no problem. A workaround might be to add "empty" rows", but this comes with all implications for sorting. Is there a simpler, better solution?
Thanks in advance.
Thanks in advance.
It is a complete mystery or ... the Session Settings (setup) could be different.
I just created a component Elena ( just copying / pasting your code )
Application : ElenaApp.app ( button "Update Preview" )
1) Test OK : with my CSS
2) Test KO with the CSS by default
Your Session Settings could be the problem.
Try the code with a free developer org.
Alain
All Answers
Add this for the style of your component:
Alain
Thank you for replying. I applied styling to the div that wraps the grid but it doesn't seem to have any effect. The grid itself (without any changes) displays the vertical scroll when menu pops up, but once I'm trying to scroll, the menu disappears (and scroll as well).
Thanks again,
Elena
Did you include your datatable itself in a <div style="height: 500px"> ?
Salesforce : documentation : The width and height of the datatable is determined by the container element. A scroller is appended to the table body if there are more rows to display. For example, you can restrict the height to 300px by applying CSS styling to the container element. https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_datatable.htm
If you could post your code, that could also be interesting.
Thank you, I'll probably go with adding "fake" empty rows if total records is less than a given number (5?) and deal with sorting (or make no sorting if there are so few rows :))
I cannot reproduce your problem.
What did you use for the "scoped tabs" ?
https://www.lightningdesignsystem.com/components/scoped-tabs/#site-main-content
The difference should be the scoped tabs.
There is only one row in each datatable.
I tried to reproduce your problem but that always works for me.
That always works for me.
The target page could be your problem (above it is a contact).
Elena
It is a complete mystery or ... the Session Settings (setup) could be different.
I just created a component Elena ( just copying / pasting your code )
Application : ElenaApp.app ( button "Update Preview" )
1) Test OK : with my CSS
2) Test KO with the CSS by default
Your Session Settings could be the problem.
Try the code with a free developer org.
Alain
Elena
Here's an important tip when you develop Lex components.
Great superbadge: Lightning Component Framework Specialist
Prework and Notes: In the Setup > Security Controls > Session Settings section of Salesforce Classic, disable the component cache by deactivating the setting for Enable secure and persistent browser caching to improve performance.
https://trailhead.salesforce.com/en/superbadges/superbadge_lcf
So a Lex developer always works with this option deactivated as you have found by yourself.
That is a good practice recommended by Salesforce during a Lex development generally.
https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005aArQAI