Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

DataViewList height is zero when height set to fit content, regardless of the actual data. #720

Closed
mamiksik opened this issue Oct 23, 2020 · 5 comments

Comments

@mamiksik
Copy link

Platform

Android and Web Preview

Steps to Reproduce

  1. Put DataViewList inside a scrollable container
  2. Fill the DataViewList with enough data to overflow the container
  3. Set the heigh of DataViewList to fit the content

Project Link

https://x.thunkable.com/copy/0c58adf514393b90cf2d2b0a02b2b146

Expected Behavior

All data from DataViewList are displayed as the whole container is scrollable.

Screenshot_20201023_174422

Actual Behavior

The DataViewList is scaled down to zero height.

Screenshot_20201023_174440

Potential fix

Remove atributed flex: 0 0 0%; from the DataViewList when set to fit content.

@StevenPurn
Copy link

Hi! Thanks for filing an issue.

Can you clarify what the use case for this is? Typically items that are scrollable cannot fit content since the content is the scroll area which can shrink or grow as needed to ensure all the child items fit inside. So, generally, I would recommend using either fill container or setting an explicit height. Though if we want to enforce that the option shouldn't be available in the UI.

I'm open to looking into a potential solution if you have a compelling use case that isn't solved by some combination of flex sizing or setting the height directly so please let me know.

@mamiksik
Copy link
Author

Hi, we want to fit multiple list views and heading into a single scrollable area (Note we also want the heading to "scroll out" when you scroll down, so it's not taking space on the screen). Rather than having multiple scrollable areas. We could not find a different solution to our problem, I am happy to hear if there is one, because I think this is quite a common use-case.

Screenshot_20201024_142536

I think that if the current behaviour is correct the fit content option on DataViewList should be disabled because now it does not fit the content, it just shrinks itself down.

I personally then suggest disabling the scroll on DataViewList when fit content is selected. 1) It would greatly extend what can be done in Thunkable with lists. 2) It would make the behaviour more predictable and coherent. 3) I suspect It is not a compatibility breaking change.

I am looking forward to hearing your opinion.

@mamiksik
Copy link
Author

Hi, I've got a new finding. Setting absolute height to DataViewList also does not work for the same reason; the attribute flex: 0 0 0%;

@StevenPurn
Copy link

Thanks for the follow up. I think this is something we can enable. I'll take a look at it this week and I would expect it to be fixed in production by early next week.

@mamiksik Thanks for the additional info. I'll make sure we get this fixed as well.

@StevenPurn
Copy link

I believe this should be fixed now. Please update your companion apps (and rebuild built apps if necessary) and respond here if you notice further issues. Until then, I'll close this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants