Skip to content

Commit

Permalink
SQ
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel-bitfly committed Oct 16, 2024
1 parent a916539 commit 2602efb
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 102 deletions.
4 changes: 2 additions & 2 deletions frontend/components/bc/BcAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ const copyText = async () => {
class="bc-accordion-list"
>
<li
v-for="item in items"
:key="`${item}`"
v-for="(item, index) in items"
:key="`${index}-${item}`"
class="bc-accordion-list__item"
>
<slot name="item" :item />
Expand Down
21 changes: 16 additions & 5 deletions frontend/components/bc/BcContentFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import { faMagnifyingGlass } from '@fortawesome/pro-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
interface Props {
const props = defineProps<{
disabledFilter?: boolean,
isLoading?: boolean,
searchPlaceholder?: string,
}
const props = defineProps<Props>()
}>()
const emit = defineEmits<{ (e: 'filter-changed', value: string): void }>()
Expand Down Expand Up @@ -45,6 +45,8 @@ watchDebounced(filter, () => {
<InputText
ref="input"
v-model.trim="filter"
type="search"
aria-busy="true"
:placeholder="props.searchPlaceholder"
:disabled="!isFilterVisible"
:class="{ visible: isFilterVisible }"
Expand All @@ -60,9 +62,18 @@ watchDebounced(filter, () => {
@click="handleClick"
>
<BcScreenreaderOnly>
{{ !isFilterVisible ? $t('filter.open') : $t('filter.close') }}
{{ isFilterVisible ? $t('filter.open') : $t('filter.close') }}
</BcScreenreaderOnly>
<FontAwesomeIcon :icon="faMagnifyingGlass" />
<BcLoadingSpinner
v-if="isFilterVisible && isLoading"
size="full"
alignment="center"
loading
/>
<FontAwesomeIcon
v-else
:icon="faMagnifyingGlass"
/>
</Button>
</div>
</template>
Expand Down
Loading

0 comments on commit 2602efb

Please sign in to comment.