diff --git a/src/components/lexicon/LexiconMain.vue b/src/components/lexicon/LexiconMain.vue
index c973a81c..3750fc41 100644
--- a/src/components/lexicon/LexiconMain.vue
+++ b/src/components/lexicon/LexiconMain.vue
@@ -48,6 +48,7 @@
:passed-lexicon-items="lexiconItemsModified"
:lexicon-loading="false"
:features="features"
+ :key="lexiconItemsModified.length + 1"
:lexicon-type="data.treeType"
:sample-ids="sampleNames"
>
diff --git a/src/components/lexicon/LexiconTableBase.vue b/src/components/lexicon/LexiconTableBase.vue
index 332590dd..77dfd12a 100644
--- a/src/components/lexicon/LexiconTableBase.vue
+++ b/src/components/lexicon/LexiconTableBase.vue
@@ -167,6 +167,7 @@ export default defineComponent({
...mapState(useLexiconStore, ['lexiconItems']),
...mapState(useProjectStore, ['name']),
...mapWritableState(useProjectStore, ['tab']),
+ ...mapWritableState(useGrewSearchStore, ['reloadGrew']),
getLexiconData() {
this.lexiconData = [];
for (const lexiconItem of this.passedLexiconItems) {
@@ -223,14 +224,15 @@ export default defineComponent({
get() {
let grewRuleConcatenated = '';
let counter = 1;
-
for (const after of this.table.selected) {
+
const before = this.findOriginalLexiconItem(after);
const thisRule = this.grewRuleFromLexiconItemPair(before, after);
grewRuleConcatenated += `rule r${counter} {\n${thisRule}\n}\n`;
counter = counter + 1;
}
this.changeLastGrewQuery({ text: grewRuleConcatenated, type: 'REWRITE', userType: this.lexiconType });
+ this.reloadGrew += 1;
this.tab = 'grew';
},
diff --git a/src/pages/Project.vue b/src/pages/Project.vue
index 12025c96..79d2f7db 100644
--- a/src/pages/Project.vue
+++ b/src/pages/Project.vue
@@ -99,7 +99,7 @@
>
-
+
@@ -207,7 +207,7 @@ export default defineComponent({
]),
...mapWritableState(useProjectStore, ['reloadSamples', 'tab']),
...mapState(useGithubStore, ['reloadCommits']),
- ...mapWritableState(useGrewSearchStore, ['grewDialog']),
+ ...mapWritableState(useGrewSearchStore, ['reloadGrew']),
projectName(): string {
return this.$route.params.projectname as string;
},
diff --git a/src/pinia/modules/grewSearch/index.ts b/src/pinia/modules/grewSearch/index.ts
index a6d9c377..1e2284b3 100644
--- a/src/pinia/modules/grewSearch/index.ts
+++ b/src/pinia/modules/grewSearch/index.ts
@@ -5,7 +5,7 @@ import { useProjectStore } from '../project';
export const useGrewSearchStore = defineStore('grewSearch', {
state: () => {
return {
- grewDialog: false,
+ reloadGrew: 0,
lastQuery: null as null | { text: string; type: 'REWRITE' | 'SEARCH'; userType: string },
treeTypes: ['user', 'user_recent', 'recent', 'validated', 'pending', 'base_tree', 'all', 'others'],
};