Update Select.vue, filters.ts, Transaksi.vue, and Type17.vue files
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import { RichSelect } from '@flavorly/vanilla-components';
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { RichSelect } from '@flavorly/vanilla-components'
|
||||
|
||||
const props = defineProps({
|
||||
placeholder: {
|
||||
@@ -23,7 +23,11 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['update:selected'])
|
||||
const data = computed(() =>
|
||||
props.placeholder == '0' ? props.data : [{ id: 0, name: props.placeholder }, ...props.data]
|
||||
props.placeholder == '0'
|
||||
? props.data
|
||||
: props.data.length > 0
|
||||
? [{ id: 0, name: props.placeholder }, ...props.data]
|
||||
: [{ id: 0, name: props.placeholder }]
|
||||
)
|
||||
const selected = ref(data.value[props.indexSelected].id)
|
||||
|
||||
|
Reference in New Issue
Block a user