Skip to content

Commit

Permalink
Merge pull request #107 from dev-family/ADM-186
Browse files Browse the repository at this point in the history
Adm 186
  • Loading branch information
aMurashkoWebSecret authored Dec 11, 2023
2 parents e998872 + a9864e4 commit 49ad29c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions admiral/ui/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const InternalSelect = <OptionType extends BaseOptionType | DefaultOptionType =
className,
)

const getValue = (value?: OptionType | null) =>
value ? (Number.isInteger(+value) ? +value : value) : undefined
const getValue = (value?: OptionType | null | number) =>
value || value === 0 ? (Number.isInteger(+value) ? +value : value) : undefined

const value = selectProps.value
const selectValue = useMemo(
Expand Down
2 changes: 1 addition & 1 deletion lib/admiral.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -73453,7 +73453,7 @@ const InternalSelect = (_o, ref) => {
[`${prefixCls}__Borderless`]: borderless,
[`${prefixCls}__MaxTag`]: typeof maxTagCount !== "undefined"
}, className);
const getValue2 = (value2) => value2 ? Number.isInteger(+value2) ? +value2 : value2 : void 0;
const getValue2 = (value2) => value2 || value2 === 0 ? Number.isInteger(+value2) ? +value2 : value2 : void 0;
const value = selectProps.value;
const selectValue = useMemo$2(() => value ? isMultiple2 ? value.map(getValue2) : getValue2(value) : void 0, [value]);
const _onChange = useCallback$1((value2, option) => {
Expand Down
Loading

0 comments on commit 49ad29c

Please sign in to comment.