diff --git a/.changeset/five-mails-beg.md b/.changeset/five-mails-beg.md index dec8fc461..439be6116 100644 --- a/.changeset/five-mails-beg.md +++ b/.changeset/five-mails-beg.md @@ -2,4 +2,4 @@ "@hi-ui/notification": patch --- -调整通知组件过度样式触发滚动条 +fix: 调整通知组件过度样式触发滚动条 diff --git a/.changeset/plenty-mice-thank.md b/.changeset/plenty-mice-thank.md new file mode 100644 index 000000000..ccbbed1f8 --- /dev/null +++ b/.changeset/plenty-mice-thank.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/input": minor +--- + +feat: MockInput 没有匹配到值时默认展示 value 值 diff --git a/.changeset/red-gorillas-count.md b/.changeset/red-gorillas-count.md new file mode 100644 index 000000000..66ca1df9d --- /dev/null +++ b/.changeset/red-gorillas-count.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +feat(input): MockInput 没有匹配到值时默认展示 value 值 diff --git a/.changeset/selfish-steaks-think.md b/.changeset/selfish-steaks-think.md new file mode 100644 index 000000000..1b95eae8e --- /dev/null +++ b/.changeset/selfish-steaks-think.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +fix(notification): 调整通知组件过度样式触发滚动条 diff --git a/packages/ui/input/src/MockInput.tsx b/packages/ui/input/src/MockInput.tsx index 759ebc820..2a40254ea 100644 --- a/packages/ui/input/src/MockInput.tsx +++ b/packages/ui/input/src/MockInput.tsx @@ -48,7 +48,7 @@ export const MockInput = forwardRef( const displayItem = useMemo(() => { if (value === '') return null - const displayItem = data.find((item) => item.id === value) + const displayItem = data.find((item) => item.id === value) || { id: value, title: value } return displayItem || null }, [value, data]) diff --git a/packages/ui/select/src/Select.tsx b/packages/ui/select/src/Select.tsx index 1183c5a28..dec864c72 100644 --- a/packages/ui/select/src/Select.tsx +++ b/packages/ui/select/src/Select.tsx @@ -84,7 +84,7 @@ export const Select = forwardRef( ref ) => { const i18n = useLocaleContext() - const innerRef = useRef() + const innerRef = useRef(null) const placeholder = isUndef(placeholderProp) ? i18n.get('select.placeholder') : placeholderProp const [menuVisible, menuVisibleAction] = useUncontrolledToggle({