A
A
askar982020-06-16 14:44:28
JavaScript
askar98, 2020-06-16 14:44:28

Showing a modal window when clicking on a table row?

Hello! Here, when I click on a column, I show a modal window, but due to v-else, the row entry disappears while working with the modal window. How can I do it? (I tried to wrap it in a div, but then the table gets corrupted)

<template>
  <UserModal v-if="showModal" @close="showModal = false" v-bind:id="todo.id"></UserModal>
  <tr v-else @dblclick="showModal=true">
    <th scope="col">{{ todo.id }}</th>
    <td>{{ todo.title }}</td>
    <td>{{ todo.body }}</td>
  </tr>
</template>
)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question