re-com
re-com copied to clipboard
Add :min-rows arg to simple-v-table
As per the docs, by default, simple-v-table
is vertically polite. In other words, it only takes up as much vertical space as it's parents and siblings allow.
We have a way to make it even less greedy via the :max-rows
argument, so that when the model
reaches a certain number of rows, it stop taking up any more height and relies on its own vertical scrollbar.
Because if this politeness, we sometimes get the situation where you only see the top header section with zero rows underneath, even though there are plenty to show. It looks like a bug.
So let's look at being greedy. Currently, we have two options:
- Add a
:min-height
style (:height
is not sufficient) to the:simple-wrapper
part
- We can also assign a fixed height to it's parent but this could be a problem if the fixed height siblings it has to contend with are already greedy, so that is fraught with danger
Therefore, it would be very useful to have a :min-rows
partner arg to :max-rows
. The default could be set to 1.
Ideally this would be an intelligent minimum, such that if you had it set to say five, but there were only two rows in the model
, it would only take up the vertical space for two rows.