Refreshing Custom Component in List View


I've built a custom component that I've embedded into a list view. Theoretically, I should be able to refresh all of the instances of this custom component by passing a list of ints representing each instance in my list view. However, when I try to do this, only the first instance of the custom component reloads.

See attached screenshots regarding the guidance offered by the app builder.

Thanks for your help with this!


Another data point - from the debug console, if I manually call my_custom_component[some_idx].reload(), it appears that only the first one is ever reloading...

Hi @Sydney_Runkle I'm seeing the same issue :disappointed: I will flag it to our team & will let you know if I get any updates or find any workarounds!

1 Like

@Tess any updates on when this might be fixed? Do you know of any workarounds that I could use in the meantime?

Hi @Sydney_Runkle! I don't have a timeline for a fix yet :disappointed: I did notice that the updateModel method works for custom components in list views - any chance you could work around this by making some update to the model instead of simply reloading? :crossed_fingers:

Hi @Tess, thanks for your response. Each of my models has data that depends on the index i of the list item that the custom component is nested in. How can I access that from the call to updateModel?

@Tess, in other words, how do I get the index of the custom component that I'm trying to update the model of?

Hi @Sydney_Runkle

Where is the trigger happening? If it's from the listView, you can do something like this:

If you need i somewhere in the component logic, you could pass it to the model: