You need to sign in to do that
Don't have an account?
Chirag Paliwal
Adjust lightning:datatable row height
I need to adjust the row height of the datatable (https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example)
The default behaviour is it takes up as much height needed to accommodate the content, I need a way to resize the row size.
Attaching the image for reference
a
The default behaviour is it takes up as much height needed to accommodate the content, I need a way to resize the row size.
Attaching the image for reference
a
The width and height of the datatable are 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.
If you want to resize the columns then you can click and drag the width to a minimum of 50px and a maximum of 1000px, unless the default values are changed. To change the minimum and maximum width column, use the 'min-column-width' and 'max-column-width' attributes.
For more information you can go to the documentation part of the datatable in the component library:
https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com