Skip to content

Commit

Permalink
Merge fff3012 into 1be87e8
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 committed Mar 6, 2023
2 parents 1be87e8 + fff3012 commit 3421b76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/pro/search/src/segments/createInputSegment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import type { InputSearchField, Segment } from '../types'

export function createInputSegment(prefixCls: string, searchField: InputSearchField): Segment<string> {
export function createInputSegment(prefixCls: string, searchField: InputSearchField): Segment<string | undefined> {
const {
fieldConfig: { trim },
defaultValue,
Expand All @@ -19,7 +19,7 @@ export function createInputSegment(prefixCls: string, searchField: InputSearchFi
inputClassName: [inputClassName, `${prefixCls}-input-segment-input`],
placeholder: searchField.placeholder,
defaultValue,
parse: input => input,
parse: input => (input ? input : undefined),
format: value => (trim ? value?.trim() : value) ?? '',
}
}

0 comments on commit 3421b76

Please sign in to comment.