Skip to content

Commit 38be499

Browse files
committed
chore: Update lodash dependency and fix null check in composition.ts
1 parent 043bdcb commit 38be499

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/quasar-jsonform/util/composition.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import debounce from 'lodash/debounce';
1010
import merge from 'lodash/merge';
1111
import get from 'lodash/get';
1212
import isPlainObject from 'lodash/isPlainObject';
13+
import isNull from 'lodash/isNull';
1314
import { useStyles } from '../styles';
1415
import { computed, inject, ref, provide } from 'vue';
1516
import type { ComputedRef } from 'vue';
@@ -114,7 +115,7 @@ export const useQuasarControl = <
114115
};
115116

116117
// console.log('input.control.value.data', input.control.value.data)
117-
if (isEmpty(input.control.value?.data)) {
118+
if (isEmpty(input.control.value?.data) || isNull(input.control.value?.data)) {
118119
input.handleChange(input.control.value?.path, input.control.value?.schema?.default || undefined)
119120
// console.log('trigger default', input.control.value.schema.default || null)
120121
}

src/pages/identities/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import { useQuasar } from 'quasar'
5151
import type { QTableProps } from 'quasar'
5252
import type { components, operations } from '#build/types/service-api'
5353
import { useErrorHandling } from '#imports'
54-
import { useIdentityStates,useIdentityInitStates } from '~/composables'
54+
import { useIdentityStates, useIdentityInitStates } from '~/composables'
5555
import { identity } from '@vueuse/core'
5656
import { useIdentityStateStore } from "~/stores/identityState"
5757
type Identity = components['schemas']['IdentitiesDto']
@@ -70,7 +70,7 @@ const $q = useQuasar()
7070
const { handleError } = useErrorHandling()
7171
const form = ref<any>(null)
7272
const { getStateColor, getStateName } = useIdentityStates()
73-
const { getInitStateColor, getInitStateName,getInitStateIcon } = useIdentityInitStates()
73+
const { getInitStateColor, getInitStateName, getInitStateIcon } = useIdentityInitStates()
7474
7575
onMounted(() => {
7676
initializePagination(identities.value?.total)

0 commit comments

Comments
 (0)