11 months ago

Multiple Modals Best Practice

Posted 11 months ago by wyatt44

Hey everyone just wanting to get some opinions,

I have a collection of list items with buttons to open modals to edit the data, the modal is the same for every item only the specific information inside changes. Each item is rendered as a Vue component.

Each modal contains a form that displays the items data and submits a post request with the item id as a field. My question is how to best handle modals for a bunch of items, should I be:

  1. rendering a modal for each item
  2. rendering a single modal and passing item specific details on click

Any advice would be greatly appreciated! - Happy Coding

Please sign in or create an account to participate in this conversation.