Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pkp/ui-library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9355389fec839741514630cd4aabdfd724df0c2e
Choose a base ref
...
head repository: pkp/ui-library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0997f00196ad1708a2ec68c0d9a74f5bc1f0ce68
Choose a head ref
  • 4 commits
  • 6 files changed
  • 4 contributors

Commits on Feb 27, 2023

  1. Copy the full SHA
    34b8e35 View commit details
  2. Merge pull request #263 from ewhanson/i7524_fix

    pkp/pkp-lib#7524 Remove unpublished filter
    ewhanson authored Feb 27, 2023
    Copy the full SHA
    5498849 View commit details

Commits on Feb 28, 2023

  1. Merge pull request #264 from NateWr/i8676_autosuggest_filters

    pkp/pkp-lib#8676 Fix autosuggest filters
    NateWr authored Feb 28, 2023
    Copy the full SHA
    45eafb5 View commit details

Commits on Mar 3, 2023

  1. Copy the full SHA
    0997f00 View commit details
2 changes: 2 additions & 0 deletions src/components/Container/Container.vue
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ import ListPanel from '@/components/ListPanel/ListPanel.vue';
import PkpForm from '@/components/Form/Form.vue';
import SelectReviewerListPanel from '@/components/ListPanel/users/SelectReviewerListPanel.vue';
import SubmissionsListPanel from '@/components/ListPanel/submissions/SubmissionsListPanel.vue';
import SubmissionsTablePanel from '@/components/Panel/SubmissionsTablePanel.vue';
export default {
name: 'Container',
@@ -11,6 +12,7 @@ export default {
PkpForm,
SelectReviewerListPanel,
SubmissionsListPanel,
SubmissionsTablePanel,
},
data() {
return {
40 changes: 19 additions & 21 deletions src/components/Filter/FilterAutosuggest.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="pkpFilter--autosuggest" :class="classes">
<component :is="component" v-bind="autosuggest" @change="toggle" />
<component :is="component" v-bind="autosuggest" @change="changeSelection" />
</div>
</template>

@@ -28,37 +28,35 @@ export default {
},
data() {
return {
value: null,
currentValue: this.value,
currentSelected: this.autosuggestProps.selected,
};
},
computed: {
autosuggest() {
if (this.value) {
return {
...this.autosuggestProps,
value: this.value,
};
}
return {...this.autosuggestProps};
return {
...this.autosuggestProps,
value: this.currentValue,
selected: this.currentSelected,
};
},
},
methods: {
toggle(fieldName, fieldProp, newVal, localeKey) {
changeSelection(fieldName, fieldProp, newVal, localeKey) {
if (fieldProp === 'value') {
this.currentValue = newVal;
} else if (fieldProp === 'selected') {
this.currentSelected = newVal;
}
},
},
watch: {
currentValue(newVal, oldVal) {
if (newVal.length) {
this.$emit('add-filter', this.param, newVal);
} else {
this.remove();
this.$emit('remove-filter', this.param);
}
// Update the value in the autosuggest field
if (this.autosuggestProps.isMultilingual) {
this.value = {};
this.value[localeKey] = newVal;
} else {
this.value = newVal;
}
},
remove() {
this.$emit('remove-filter', this.param);
},
},
};
Loading