Skip to content

Commit

Permalink
fix(comp:select): when input change multiply model input width is err…
Browse files Browse the repository at this point in the history
…or (#1829)
  • Loading branch information
threedayAAAAA committed Jan 25, 2024
1 parent 8d1e463 commit 91c1f34
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/* eslint-disable @typescript-eslint/no-explicit-any */

import { type ComputedRef, type Ref, onMounted, ref } from 'vue'
import { type ComputedRef, type Ref, onMounted, ref, watch } from 'vue'

import { callEmit } from '@idux/cdk/utils'
import { useFormFocusMonitor } from '@idux/components/form'
Expand Down Expand Up @@ -108,6 +108,11 @@ export function useInputState(props: SelectorProps, mergedSearchable: ComputedRe
}

onMounted(() => syncMirrorWidth())
watch(mirrorRef, val => {
if (val) {
syncMirrorWidth()
}
})

return {
inputRef,
Expand Down

0 comments on commit 91c1f34

Please sign in to comment.