[Vuejs]-Vue 3: Set property value to Modal

0👍

I ended up changing the button to having both the :data-bs-target and the @click as follows (which apparently works)

<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#kt_modal_1" @click="settings(item)">

and the modal I just pasted at the top of the page:

  <div class="modal fade" tabindex="-1" id="kt_modal_1">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">Modal title {{ currentItem.id }}</h5>

The settings function sets the currentItem:

 settings(item) {
      this.currentItem = item;
    },

Leave a comment