Skip to content

Commit

Permalink
fix(pro:search): click is correct when key is zero (#1748)
Browse files Browse the repository at this point in the history
  • Loading branch information
threedayAAAAA committed Nov 29, 2023
1 parent 4769dcd commit 9d996ce
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -9,7 +9,7 @@ import type { SearchState } from '../../composables/useSearchStates'

import { computed, defineComponent, inject, normalizeClass, ref, watch } from 'vue'

import { isObject } from 'lodash-es'
import { isNil, isObject } from 'lodash-es'

import { Logger, callEmit, useState } from '@idux/cdk/utils'
import { type IconInstance, IxIcon } from '@idux/components/icon'
Expand Down Expand Up @@ -81,7 +81,7 @@ export default defineComponent({
const confirmValue = (value: unknown) => {
let searchStateKey = searchState.value?.key

if (!value && searchStateKey) {
if (isNil(value) && searchStateKey) {
removeSearchState(searchStateKey)
return
}
Expand Down

0 comments on commit 9d996ce

Please sign in to comment.