Skip to content

Commit

Permalink
fix: change url when change fields list
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Mar 24, 2024
1 parent d92dd1f commit 6ba3e4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/Toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ export default {
// поставить из пресета полей
setPreset(preset) {
this.$emit("setFields", preset.columns);
this.$emit("setPreset", preset);
},
toggleField(field) {
this.$emit("toggleField", field);
toggleField(field, add, updateQuery = false) {
this.$emit("toggleField", field, add, updateQuery);
},
// индекс поля в массиве по объекту
Expand Down
5 changes: 3 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<!-- Тулбар -->
<Panel title="columns explorer" icon="el-icon-folder-opened" name="columns">
<Toolbar @toggleField="toggleField" @setFields="setFields"></Toolbar>
<Toolbar @toggleField="toggleField" @setFields="setFields" @setPreset="setPreset"></Toolbar>
</Panel>

<!-- Выбранные колонки -->
Expand Down Expand Up @@ -789,7 +789,8 @@ export default {
this.$store.commit("fields", []);
setTimeout(() => {
this.$store.commit("fields", fields);
}, 10)
setTimeout(() => this.updateUrlQuery(true), 100);
}, 50)
}
// this.updateUrlQuery();
Expand Down

0 comments on commit 6ba3e4a

Please sign in to comment.