Where Flex Repeater size remain constant. Element's width height is reduced for all instances to fit.
If there is no easy way to do this, I am ok with doing it the hard way.
Hardway:
while overflow occurs on flex repeater:
then reduce element's width and height
Is it possible to check overflow?
Is there a property under "elementStyle" to change each element's height width?
Edit1:
I guess there is no way to detect if repeater overflown.
But I can get its width and height.
Width = primaryView.width - 2xpadding - 2xmargin
Height = its basis..
I can create multiple template, with different height and width.
Next comes the hard part.
Given the number of instance.
Apply logic to path property:
Binding returns the right template such that no overflow occurs
How can I know which template to use, such that there is no overflow.
Or
I could write a message handler script to set templates width and path.
Or pass it to the template's params.
No.. the size of container must remains the same. But when you add more instances, the instances' size will reduce so that it will fit the container (flex repeater).
Set elementPosition to grow: 1 shrink: 1 basis: auto.
Set alignItems and alignContent to stretch.
This will allow your instances to grow and shrink as needed to fill the full repeater.
You can also play with assigning minHeight, maxHeight, minWidth, and maxWidth on your repeated instance in order to cap the amount of shrinking/growing.
Not trying to hijack this post, but I think I have a similar issue that I feel like it should be addressed by your instructions, but I can't seem to figure it out.
My flex repeater is set to fill the remaining area on screen (because of different screensizes the application is viewed from), and I want my templates to scale down to the point where they all fit on screen.
1 through 3 I had already set to the values you've described, but where to define the properties of your last remark I can't find. I think these are not natively suggested values? Do you define these on the repeated view, or the root container of the repeated view?
Those correspond to css properties, and you can add them in your components style property, like this:
css properties are in the form min-height, and that case is also accepted, however using camelCase like ignition does you can get dropdowns and menus that correspond to the property's possible values. Exemple with flexWrap:
Wow, this comment solved a big headache of mine! I've been unable to adjust the height of instances in a row flex repeater set to "wrap", they don't scale as expected for some reason, but by adding "height" under "elementStyle" (I used 50% for my 2 row flex repeater), the problem is solved. Thanks for the idea @pascal.fragnoud !