@rc-component/select 1.6.13 → 1.6.15

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/es/Select.d.ts CHANGED
@@ -125,7 +125,7 @@ export interface SelectProps<ValueType = any, OptionType extends BaseOptionType
125
125
  classNames?: Partial<Record<SemanticName, string>>;
126
126
  styles?: Partial<Record<SemanticName, React.CSSProperties>>;
127
127
  }
128
- declare const TypedSelect: (<ValueType = any, OptionType extends DefaultOptionType | BaseOptionType = DefaultOptionType>(props: React.PropsWithChildren<SelectProps<ValueType, OptionType>> & React.RefAttributes<BaseSelectRef>) => React.ReactElement) & {
128
+ declare const TypedSelect: (<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>(props: React.PropsWithChildren<SelectProps<ValueType, OptionType>> & React.RefAttributes<BaseSelectRef>) => React.ReactElement) & {
129
129
  Option: typeof Option;
130
130
  OptGroup: typeof OptGroup;
131
131
  };
@@ -87,7 +87,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
87
87
  } = event.currentTarget;
88
88
 
89
89
  // Handle Enter key submission - referencing Selector implementation
90
- if (key === 'Enter' && mode === 'tags' && !compositionStatusRef.current && onSearchSubmit) {
90
+ if (key === 'Enter' && mode === 'tags' && !open && !compositionStatusRef.current && onSearchSubmit) {
91
91
  onSearchSubmit(nextVal);
92
92
  }
93
93
 
@@ -100,7 +100,8 @@ export default /*#__PURE__*/React.forwardRef(function SelectInput(props, ref) {
100
100
  blur: () => {
101
101
  (inputRef.current || rootRef.current).blur?.();
102
102
  },
103
- nativeElement: rootRef.current
103
+ // Use getDOM to handle nested nativeElement structure (e.g., when RootComponent is antd Input)
104
+ nativeElement: getDOM(rootRef.current)
104
105
  };
105
106
  });
106
107
 
package/lib/Select.d.ts CHANGED
@@ -125,7 +125,7 @@ export interface SelectProps<ValueType = any, OptionType extends BaseOptionType
125
125
  classNames?: Partial<Record<SemanticName, string>>;
126
126
  styles?: Partial<Record<SemanticName, React.CSSProperties>>;
127
127
  }
128
- declare const TypedSelect: (<ValueType = any, OptionType extends DefaultOptionType | BaseOptionType = DefaultOptionType>(props: React.PropsWithChildren<SelectProps<ValueType, OptionType>> & React.RefAttributes<BaseSelectRef>) => React.ReactElement) & {
128
+ declare const TypedSelect: (<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>(props: React.PropsWithChildren<SelectProps<ValueType, OptionType>> & React.RefAttributes<BaseSelectRef>) => React.ReactElement) & {
129
129
  Option: typeof Option;
130
130
  OptGroup: typeof OptGroup;
131
131
  };
@@ -96,7 +96,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
96
96
  } = event.currentTarget;
97
97
 
98
98
  // Handle Enter key submission - referencing Selector implementation
99
- if (key === 'Enter' && mode === 'tags' && !compositionStatusRef.current && onSearchSubmit) {
99
+ if (key === 'Enter' && mode === 'tags' && !open && !compositionStatusRef.current && onSearchSubmit) {
100
100
  onSearchSubmit(nextVal);
101
101
  }
102
102
 
@@ -109,7 +109,8 @@ var _default = exports.default = /*#__PURE__*/React.forwardRef(function SelectIn
109
109
  blur: () => {
110
110
  (inputRef.current || rootRef.current).blur?.();
111
111
  },
112
- nativeElement: rootRef.current
112
+ // Use getDOM to handle nested nativeElement structure (e.g., when RootComponent is antd Input)
113
+ nativeElement: (0, _findDOMNode.getDOM)(rootRef.current)
113
114
  };
114
115
  });
115
116
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/select",
3
- "version": "1.6.13",
3
+ "version": "1.6.15",
4
4
  "description": "React Select",
5
5
  "engines": {
6
6
  "node": ">=8.x"