Skip to content

Commit

Permalink
fix: BaseSelect handle number value. WF-28
Browse files Browse the repository at this point in the history
  • Loading branch information
madeindjs committed Jun 28, 2024
1 parent 19f9682 commit 67d7e89
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 67d7e89

Please sign in to comment.