Skip to content

Commit

Permalink
Merge branch 'release/v0.14.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed Apr 24, 2024
2 parents ce997fa + cdd85ff commit dcc5ec4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
10 changes: 5 additions & 5 deletions lib/basic/oui-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ function doSelect(pos: number) {
</tr>
</thead>
<tbody>
<template v-for="row, rowPos in data" :key="row">
<template v-for="item, rowPos in data" :key="item">
<tr
:class="{
_selectable: selectable,
_active: modelSelected === rowPos,
}"
@click="doSelect(rowPos)"
@contextmenu.prevent="emit('context', row, rowPos, $event)"
@contextmenu.prevent="emit('context', item, rowPos, $event)"
>
<template v-for="col, pos in cols" :key="col.name">
<td
Expand All @@ -86,12 +86,12 @@ function doSelect(pos: number) {
>
<slot
:name="`col-${col.name}`" v-bind="{
value: row[col.name],
value: item[col.name],
col,
pos,
row }"
item }"
>
{{ row[col.name] }}
{{ item[col.name] }}
</slot>
</td>
</template>
Expand Down
6 changes: 3 additions & 3 deletions lib/basic/oui-tableview.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { computed, reactive, ref } from 'vue'
import { createArray, sortedOrderby, uuid } from 'zeed'
import type { OuiTableColumn } from '../lib'
import { OuiDraggable, OuiTable, useMenu } from '../lib'
import { useMenu } from '../lib'
import OuiTableview from './oui-tableview.vue'
const state = reactive({
Expand Down Expand Up @@ -67,8 +67,8 @@ const x = ref(0)
<template #col-one="{ value, col }">
{{ col.name }} {{ value }}
</template>
<template #col-action="{ value, col }">
<button class="oui-button" size="small" @click="console.log(value, col)">
<template #col-action="{ item, col }">
<button class="oui-button" size="small" @click="console.log(item.id, col)">
Action
</button>
</template>
Expand Down
6 changes: 2 additions & 4 deletions lib/basic/oui-tableview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ function doSelect(pos: number) {
<slot :name="`header-${col.name}`" v-bind="{ col, pos }">
{{ col.title ?? col.name }}
<template v-if="col.sortable === true && sortName === col.name" />
<span @click="(widths as any)[pos] -= 100">
{{ widths[pos] }}
</span>
</slot>
</div>
</template>
Expand Down Expand Up @@ -107,7 +104,8 @@ function doSelect(pos: number) {
value: item[col.name],
col,
pos,
row: item }"
item,
}"
>
{{ item[col.name] }}
</slot>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "oui-kit",
"type": "module",
"version": "0.14.3",
"version": "0.14.4",
"author": {
"name": "Dirk Holtwick",
"email": "[email protected]",
Expand Down

0 comments on commit dcc5ec4

Please sign in to comment.