Skip to content

Modal opening on a card in a repeater block not opening the *expected* data/details #14810

Answered by mikesealey
aMacDawg asked this question in Help
Discussion options

You must be logged in to vote

Hey @aMacDawg

With the component tree laid out in this way, you're actually creating a new modal for every row you fetch in that table, which will eventually run into performance issues. You will only see one in the component tree, but with it being inside a repeater, under the hood one is created for every row.

You should make sure your modal is not a child component of a repeater. In your Card component, with the button's on-click actions you can specify that they should open the modal. You should also use a "Update State" action to set that card's row_id into state.

Inside the modal you can then add a data provider set to fetch one row from the table, filtering on _id that matches sta…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mikesealey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants