ListView is re-arranging its child components on its own

Ok, another haunting here. :ghost: :ghost:

Check out this ListView, notice how several components got moved below the line? I did not do that. It is the third time this has happened in the last 24 hours on this same List View.

This is what it looked like before the poltergeist got to it:

Heyhey!

This is quite the annoying poltergeist :sweat_smile: it seems to happen when listviews are set to have exactly 0 rows in the editor. Can you try this workaround and see if it helps at all?

Ahh ok.

I discovered inEditorMode for this exact use a couple weeks ago, but have not fully transitioned to using it. I will do so now!

I usually do something like {{captionJobs.value.length === 0 ? 2 : captionJobs.value.length}} during development.

I'm thinking this might be the best version, a hybrid of the two: It picks up the length correctly, but if it is 0 is stays 0 unless in edit mode.

{{captionJobs.value.length > 0 
  ? captionJobs.value.length 
  : retoolContext.inEditorMode 
  ? 2 
  : 0}}
1 Like