Bad news. There may be a small amount use cases where modules and listviews work together, but they are not currently supported together. As modules are still fairly new (and were in Beta until last week), we're still working on efforts to improve their overall performance, including blocking certain items from listviews (like modules or other listviews).
Let me know if there's anything I can actually help with, or there's any more bad news I can deliver 😓
I would also like to see module within ListView. It seems like it fails loudly(instead of silently) right now, don't know whether it is supposed to be a improvement
Running into this same problem. Have a module (the module is just a text component for testing) inside of a container inside of the list view, and the module just shows "undefined" as the text, even though the input to the module seems to be valid. Outside of the ListView the module with the same input works just fine and shows the input text. The screen shot below shows the modules with the same input (in the list view and outside) with the component info and how it renders.
Hi @scarricciu! I tried to repro (text inside container inside list view inside module), and it seems to be working for me in both the module and a parent app that contains the module. What is the undefined supposed to be instead?
@victoria Bringing this error back up. Detailed steps to recreate below, and please let me know if you need more info.
Create a module that has a query tied to the module, the module just displays the results of the query when it loads
Create a app
Put the module in the app, the module renders as it should, the query tied to the module runs, etc
Create a list view in the same app. In the list view put a container. In that container put the same module.
The module in the listview container is blank, even though it is the same module put in the same app in step 3, just this time inside the listview container.
In looking at the logs, I can see that the query associated with the module I put into the listview container has failed with the following error related to the pageUuid. It seems that in a listview the pageUuid is undefined in contrast to an app:
The logs for the module placed outside of the listview container show that the query was successful. You can see that the module name "activitySummary" and the query "tasks" are the same for each, with the only difference of one being in the listview (activitySummary3).
Hi @scarricciu! Thank you for taking the time to share your really helpful repro. I followed along as closely as I could and ran into a blocker—Retool does't support modules inside of listviews, or modules inside of containers inside of listviews.
There are quite a few incompatibilities between listviews and modules, so if you try putting a module inside a listview, it shouldn't let you! Same with trying to put a module in a container, then that container inside a listview. There is a "bug" that allows you to first put a container into a listview, then a module into that container, though you still shouldn't be able to.
So in short,
Listview > Module
Listview > (Container > Module)
(Listview > Container) > Module possible, but also not supported.
I don't believe so, though I went ahead a created an internal bug report for visibility, and tagged this thread so I can update with any news!
Update [07/22/22]: We removed this hacky workaround to place list views inside of other list views, since we don't currently support this (in short, the list view uses the i value and having two list views both using the same i gets wonky). However, we are working on officially supporting nest list views very soon. Modules in list views might take a little longer to launch due to the complexity, but also coming soon!
Hey @tradesorg_chris! There's an internal ticket already for this, but no timeline yet. Just asked for an update, so I'll share it here as soon as I hear back.
You should be able to just reference the input component specifically, you'll just need to input the correct index variables to properly access the nested data.
My solution was to make each block in my listview a module itself. Then I (cringe) added 10 of those modules and used the « hidden » feature to hide those that were not needed. Bloated, not elegant, but it helped me get pass this frustration.