Skip to content

Commit

Permalink
Merge pull request #481 from madeindjs/WF-28
Browse files Browse the repository at this point in the history
fix: `BaseSelect` handle `number` value. WF-28
  • Loading branch information
ramedina86 authored Jul 23, 2024
2 parents 31731bb + 67d7e89 commit 1cdad8a
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/ui/src/core_components/base/BaseSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@
</template>

<script setup lang="ts">
import { computed, Ref, toRefs } from "vue";
import { nextTick } from "vue";
import { ref } from "vue";
import { watch } from "vue";
import { computed, nextTick, PropType, Ref, ref, toRefs, watch } from "vue";
const emit = defineEmits(["change"]);
const props = defineProps<{
baseId: string;
activeValue: any;
options: Record<string, string>;
maximumCount: number;
mode: "single" | "multiple";
placeholder?: string;
}>();
const props = defineProps({
baseId: { type: String, required: true },
activeValue: { required: true, validator: () => true },
options: {
type: Object as PropType<Record<string, string | number | undefined>>,
required: true,
},
maximumCount: { type: Number, required: true },
mode: { type: String as PropType<"single" | "multiple">, required: true },
placeholder: { type: String, required: false, default: undefined },
});
const { baseId, activeValue, options, maximumCount, mode, placeholder } =
toRefs(props);
Expand All @@ -131,8 +131,9 @@ const listOptions = computed(() => {
selectedOptions.value.includes(optionKey)
)
return;
if (
!option
!String(option)
.toLocaleLowerCase()
.includes(activeText.value.toLocaleLowerCase())
)
Expand Down

0 comments on commit 1cdad8a

Please sign in to comment.