tsalb/lwc-utils

SOQL / Collection Datatable - Allow custom relative height in Screen Flows

Feldstrom opened this issue · 3 comments

For the collection datatable it is currently not possible to set a custom relative hight leading to issues with UX as seen in video attached.

Screen.Recording.2021-01-05.at.5.56.36.PM.mov
tsalb commented

Yep, as we discussed offline (of github) - the root cause is my decision to attach interactivity from within the cell itself - allowing me to control overflow vertically but within the bounds of the table.

There is a more complicated approach, one similar to SFDC list views which is to attach a hidden overlay to dynamically attach "popovers" which track the x-y coordinates of where the cell interactivity is launched from. This is too high LOE for my liking so we are stuck with....

The workaround is to specify a minimum height (which is a feature for soqlDatatable on record flexipage, but not screen flows).

I'll port that over and add a disclaimer on the README for this behavior.

tsalb commented

Note to self - since screen flows can be limited in space (depending on if they're launched from flexipage, quick action, etc) it might be better to just add a "Table Height (px)" property with a default of null which solution designers can configure.

This is different than relative max height since that uses vh to calculate height and this one would use px

tsalb commented

I am wrong about the height thing being able to fix this.

That does indeed extend the container of the table however it doesn't affect the dropdown from the picklist. I am going to evaluate including a experimental checkbox that does a CSS hack that allows for overflow - but it has some caveats I'd like to document before introducing it.