x-ui-design 0.5.50 → 0.5.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/types/components/Select/Select.d.ts +1 -1
- package/dist/esm/types/types/select.d.ts +1 -0
- package/dist/index.esm.js +4 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/lib/components/Select/Select.tsx +4 -3
- package/lib/types/select.ts +2 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import React, { ReactElement } from 'react';
|
|
|
2
2
|
import { SelectProps } from '../../types/select';
|
|
3
3
|
import './style.css';
|
|
4
4
|
declare const Select: {
|
|
5
|
-
({ prefixCls, id, searchValue, autoClearSearchValue, filterOption, optionFilterProp, children, options, listHeight, menuItemSelectedIcon, mode, value, defaultValue, maxCount, disabled, loading, placeholder, allowClear, filterable, defaultOpen, size, error, dropdownClassName, className, suffixIcon, searchIcon, style, showSearch, open, showArrow, notFoundContent, noStyle, feedbackIcons, placement, removeIcon, maxTagCount, onSearch, onSelect, onDeselect, onClear, onChange, onClose, tagRender, getPopupContainer, dropdownRender, onDropdownVisibleChange, ref }: SelectProps): ReactElement;
|
|
5
|
+
({ prefixCls, id, searchValue, autoClearSearchValue, filterOption, optionFilterProp, children, options, listHeight, menuItemSelectedIcon, mode, value, defaultValue, maxCount, disabled, loading, placeholder, allowClear, filterable, defaultOpen, size, error, dropdownClassName, className, suffixIcon, searchIcon, style, showSearch, open, closeFromParent, showArrow, notFoundContent, noStyle, feedbackIcons, placement, removeIcon, maxTagCount, onSearch, onSelect, onDeselect, onClear, onChange, onClose, tagRender, getPopupContainer, dropdownRender, onDropdownVisibleChange, ref }: SelectProps): ReactElement;
|
|
6
6
|
displayName: string;
|
|
7
7
|
} & {
|
|
8
8
|
Option: React.FC<import("../../types/select").OptionProps>;
|
package/dist/index.esm.js
CHANGED
|
@@ -3275,6 +3275,7 @@ const SelectComponent = ({
|
|
|
3275
3275
|
style,
|
|
3276
3276
|
showSearch = false,
|
|
3277
3277
|
open = true,
|
|
3278
|
+
closeFromParent = false,
|
|
3278
3279
|
showArrow = true,
|
|
3279
3280
|
notFoundContent = false,
|
|
3280
3281
|
noStyle,
|
|
@@ -3400,10 +3401,10 @@ const SelectComponent = ({
|
|
|
3400
3401
|
}
|
|
3401
3402
|
}, [isOpen]);
|
|
3402
3403
|
useEffect(() => {
|
|
3403
|
-
if (!open && isOpen) {
|
|
3404
|
+
if (!open && isOpen && closeFromParent) {
|
|
3404
3405
|
handleClickOutside();
|
|
3405
3406
|
}
|
|
3406
|
-
}, [open, isOpen]);
|
|
3407
|
+
}, [open, isOpen, closeFromParent]);
|
|
3407
3408
|
useEffect(() => {
|
|
3408
3409
|
if (!isOpen) return;
|
|
3409
3410
|
const _updateDropdownPosition = () => updateDropdownPosition();
|
|
@@ -3781,7 +3782,7 @@ const SelectComponent = ({
|
|
|
3781
3782
|
textAlign: 'center'
|
|
3782
3783
|
}
|
|
3783
3784
|
}, showSearch ? {
|
|
3784
|
-
contentEditable:
|
|
3785
|
+
contentEditable: true
|
|
3785
3786
|
} : {}, {
|
|
3786
3787
|
id: `${prefixCls}-search-tag-input`,
|
|
3787
3788
|
className: `${prefixCls}-tag-input`
|