Skip to content

Commit

Permalink
Search Bar filter translation (#9528)
Browse files Browse the repository at this point in the history
* Search Bar filter translation

* SearchBar filter fixing translation
  • Loading branch information
jacob-nv authored Aug 4, 2023
1 parent eb25832 commit dd2c63c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/web-pkg/src/components/SearchBarFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<oc-filter-chip
:is-toggle="false"
:is-toggle-active="false"
:filter-label="currentSelection.title"
:filter-label="currentSelectionTitle"
:selected-item-names="[]"
class="oc-search-bar-filter"
raw
Expand Down Expand Up @@ -57,15 +57,14 @@ export default defineComponent({
const { $gettext } = useGettext()
const useSopeQueryValue = useRouteQuery('useScope')
const currentFolderEnabled = computed(() => props.currentFolderAvailable)
const currentSelection = ref<LocationOption>()
const userSelection = ref<LocationOption>()
const locationOptions = ref<LocationOption[]>([
const currentSelectionTitle = computed(() => $gettext(currentSelection.value?.title))
const locationOptions = computed<LocationOption[]>(() => [
{
id: SearchLocationFilterConstants.currentFolder,
title: $gettext('Current Folder'),
enabled: currentFolderEnabled
enabled: props.currentFolderAvailable
},
{
id: SearchLocationFilterConstants.allFiles,
Expand Down Expand Up @@ -122,7 +121,13 @@ export default defineComponent({
emit('update:modelValue', { value: option })
}
return { currentSelection, isIndexGreaterZero, onOptionSelected, locationOptions }
return {
currentSelection,
currentSelectionTitle,
isIndexGreaterZero,
onOptionSelected,
locationOptions
}
}
})
</script>
Expand Down

0 comments on commit dd2c63c

Please sign in to comment.