mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Make draggable a prop
This commit is contained in:
parent
04a11626f5
commit
8d957a53e2
4 changed files with 6 additions and 5 deletions
|
@ -16,8 +16,9 @@ const props = defineModel<{
|
|||
sortBy?: string,
|
||||
sortDesc?: boolean,
|
||||
selection?: number[],
|
||||
draggable?: boolean,
|
||||
}>();
|
||||
let { columns, data, sort, sortSelf, sortBy, sortDesc, selection } = $(props);
|
||||
let { columns, data, sort, sortSelf, sortBy, sortDesc, selection, draggable } = $(props);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(event: 'rowAction', index: number): void,
|
||||
|
@ -126,7 +127,7 @@ function dragDropRow() {
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(row, index) in displayData" :key="index"
|
||||
draggable="true"
|
||||
:draggable="draggable"
|
||||
@click="() => rowSelection(index)"
|
||||
@dblclick="() => emit('rowAction', index)"
|
||||
@dragstart="() => draggedRow = index"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue