Skip to content

Commit

Permalink
feat: PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
annacv committed Jun 27, 2024
1 parent 68fc2b1 commit b29a06b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
:facet="facet"
class="x-facet-filter-lg x-mb-8 x-w-full"
>
<label for="all">
<input id="all" type="checkbox" :checked="isSelected" />
<label :for="facet.id">
<input :id="facet.id" type="checkbox" :checked="isSelected" />
All
</label>
</AllFilter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
import { Dictionary } from '@empathyco/x-utils';
import BaseEventButton from '../../../../components/base-event-button.vue';
import { isArrayEmpty } from '../../../../utils/array';
import { VueCSSClasses } from '../../../../utils/types';
import { XEventsTypes } from '../../../../wiring/events.types';
import { FiltersByFacet } from '../../store';
import { facetsXModule } from '../../x-module';
import { useGetter } from '../../../../composables';
import { useGetter } from '../../../../composables/use-getter';
/**
* This component receives a required `facet` with
Expand All @@ -49,7 +48,6 @@
required: true
}
},
setup(props) {
/** The getter of the selectedFiltersByFacet. */
const { selectedFiltersByFacet }: Dictionary<ComputedRef<FiltersByFacet>> = useGetter(
Expand All @@ -72,7 +70,7 @@
*
* @returns True if is selected false otherwise.
*/
const isSelected = computed((): boolean => {
const isSelected = computed(() => {
return isArrayEmpty(selectedFiltersByFacet.value?.[props.facet.id]);
});
Expand All @@ -85,7 +83,7 @@
* @returns The dynamic CSS classes to apply to the component.
* @internal
*/
const cssClasses = computed((): VueCSSClasses => {
const cssClasses = computed(() => {
return {
'x-selected x-all-filter--is-selected': isSelected.value
};
Expand Down

0 comments on commit b29a06b

Please sign in to comment.