mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 16:16:46 +08:00
Merge to master (#435)
* Fix/venus spanish (#423) fix: update venus spanish language Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com> * fix: can not convert url text to link after paste * fix: double link icon size error * feat(code): enhance markdown parse code * fix(code): add robust * fix: remove special menu * chore: clean code * fix: ime with command menu * fix(code): langs[lang] is not a function * fix: can't add image and delete more action button (#430) * feat: add zh_Hant for venus (#431) * fix: lang select in code block is insanity * GitHub Doc Updates (#421) * Update types-of-contributions.md * Update README.md Tidy up links section * fix: inline menu position (#433) Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com> Co-authored-by: QiShaoXuan <qishaoxuan777@gmail.com> Co-authored-by: tzhangchi <terry.zhangchi@outlook.com> Co-authored-by: lawvs <18554747+lawvs@users.noreply.github.com> Co-authored-by: DiamondThree <diamond.shx@gmail.com> Co-authored-by: CJSS <CJSS@users.noreply.github.com> Co-authored-by: Qi <474021214@qq.com>
This commit is contained in:
@@ -41,7 +41,14 @@ export const Select = forwardRef(function CustomSelect<TValue>(
|
||||
ref: ForwardedRef<HTMLUListElement>
|
||||
) {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const { width = '100%', style, listboxStyle, placeholder } = props;
|
||||
const {
|
||||
width = '100%',
|
||||
style,
|
||||
listboxStyle,
|
||||
placeholder,
|
||||
onListboxOpenChange,
|
||||
onChange,
|
||||
} = props;
|
||||
const components: SelectUnstyledProps<TValue>['components'] = {
|
||||
// Root: generateStyledRoot({ width, ...style }),
|
||||
Root: forwardRef((rootProps, rootRef) => {
|
||||
@@ -80,14 +87,15 @@ export const Select = forwardRef(function CustomSelect<TValue>(
|
||||
|
||||
return (
|
||||
<SelectUnstyled
|
||||
listboxOpen={isOpen}
|
||||
onListboxOpenChange={() => {
|
||||
setIsOpen(true);
|
||||
}}
|
||||
{...props}
|
||||
listboxOpen={isOpen}
|
||||
onListboxOpenChange={open => {
|
||||
setIsOpen(open);
|
||||
onListboxOpenChange?.(open);
|
||||
}}
|
||||
onChange={v => {
|
||||
setIsOpen(false);
|
||||
props.onChange && props.onChange(v);
|
||||
onChange?.(v);
|
||||
}}
|
||||
ref={ref}
|
||||
components={components}
|
||||
|
||||
Reference in New Issue
Block a user