Skip to content

Commit

Permalink
feat: show ItemDetails on row click
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Aug 23, 2020
1 parent a4384ca commit d0baf29
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
:columns="columns"
:data="filteredItems"
:options="tableOptions"
@row-click="rowClick"
ref="table"
>
<template slot="child_row" slot-scope="props">
<ItemDetails :item="$store.getters.getItemByDefaultField(props.row[$store.state.defaultField])"></ItemDetails>
Expand Down Expand Up @@ -509,6 +511,10 @@ export default {
delete(history[this.itemsJsonUrl]);
this.$store.commit('jsonUrlHistory', history);
}
},
rowClick(event) {
this.$refs.table.toggleChildRow(event.row.id);
}
},
Expand Down

0 comments on commit d0baf29

Please sign in to comment.