Expandable Rows

I’ve created a Notes form where a user enters a note and it gets appended to a list upon submit. I created it using a repeater and have figured out how to get the note to append to the list using Loaded. The issue I’m having now is that these notes vary in length. So there is no way for me to set the row height or guess it. This means when someone enters a note it overlaps the previous note. I read on the Axure blog

Blockquote Fit to Content in HTML does not work with repeaters whose items are reloaded after the initial page load. This includes repeaters that are sorted or filtered as well as those whose rows are dynamically added, deleted, or updated in the web browser.

So I’m using the Fit to Content in HTML which means it doesn’t work because I’m using a reloaded command.

Does anyone know a workaround to this?

Another question I have is, is there a way to scroll a repeater after it reaches a certain size?

I’ve attached my rp file so you can see how I have it working. NoteTest.rp (59.6 KB)

I just posted a hack I discovered to adjust the height of repeater rows based on the text content in the data sheet. However, this only works for the initial repeater. It breaks when the repeater gets updated (per the Axure documentation note.) It might lead to a solution for you, though.

Also, a few years ago we came up with a way to adjust text widget sizes in a repeater using javascript injection. But… would be difficult to impossible to calculate text wrapping and height needed for something like a text area.

Not a great answer, but perhaps some combination of these could make some magic happen.

You can wrap the repeater in a dynamic panel, decrease the height (or width) to your desired “viewport area” and turn on “Scroll as Needed”. Or, do all this for widgets/groups/panels inside your repeater to scroll within a row.

I’ll try to look at your file if I get the time soon.

Thanks for your reply. I’ll take a deeper look at these when I get time. I think I have it setup with a dynamic panel to scroll. I guess I expected that adding rows would make the DP scroll. But it sounds like I have to make the repeater longer than the DP which is totally doable.

It can help to put the repeater in a dynamic panel keeping “Fit to Content”, then placing that in a dynamic panel without “Fit to Content”. In this way you can get the dimensions of the repeater by getting the height and width of the inner dp. As repeater is filtered, added, deleted, etc. the inner dp size will change, of course. You can also add padding around the repeater to help with scrolling if needed.

Hi KavaKiwi!

This bug where “Fit to Content in HTML” breaks on any kind of update (for which your completely reasonable scenario serves as a poster child) has existed since Axure 8, with no apparent interest in fixing it from tha Axure folks. I (re)filed this bug with support@axure.com today—before I even saw your post!

By the way, your block quote mentions that you saw this on the Axure Blog? Can you reply with.a link? Simply saying this is somehow “intended behavior” seems outrageous to me.

Cheers,

Joseph

I was thinking about filing this bug again as well, based on what I discovered in the “bug in repeaters” thread I linked to above. Maybe changing the way divs are handled could help Axure fix this…?

Here is the Axure Reference page mentioning the same thing in KavaKiwi’s block quote:

https://docs.axure.com/axure-rp/reference/repeaters/#fit-to-content-in-html

Here’s the link you requested you can find the quote in the Fit to Content HTML section…

https://docs.axure.com/axure-rp/reference/repeaters/

ok that was a little bit of a crazy work around but it works great for scrolling the notes. Thx.

Ok so I’m stumped I can’t get this to work and looks like there isn’t a real solution when trying to dynamically add rows in the repeater. :frowning_face: I’m going to now see if I can pull this off with DP.

I know. It’s ridiculous that this bug still exists.