lu-lowcode-package-form 0.10.2 → 0.10.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lu-lowcode-package-form",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@dnd-kit/core": "^6.1.0",
@@ -1,12 +1,12 @@
1
1
 
2
2
 
3
3
  import { Input, Select as OriginalSelect, Spin } from 'antd';
4
- import React, { useEffect, useState } from 'react';
4
+ import React, { useEffect, useState,forwardRef } from 'react';
5
5
  import { BaseWrapper } from "../base"
6
6
  import { debounce, isEqual } from 'lodash';
7
7
 
8
8
 
9
- const SearchSelect = ({ addWrapper = true, form, fieldName, fieldsValue, value, type, defaultValue, onChange, option_label, option_value, option_search, options, request, requestParams, callError, subRequest, sub_option_label = "label", mode = "single", sub_option_value = "id", rightIconRender, rightIcon, rightIconClick, ...props }) => {
9
+ const SearchSelect = forwardRef(({ addWrapper = true, form, fieldName, fieldsValue, value, type, defaultValue, onChange, option_label, option_value, option_search, options, request, requestParams, callError, subRequest, sub_option_label = "label", mode = "single", sub_option_value = "id", rightIconRender, rightIcon, rightIconClick, ...props },ref) => {
10
10
  const [nOptions, setNOptions] = React.useState([])
11
11
  const [fetching, setFetching] = useState(false);
12
12
  useEffect(() => {
@@ -141,7 +141,7 @@ const SearchSelect = ({ addWrapper = true, form, fieldName, fieldsValue, value,
141
141
  return addWrapper ? (
142
142
  <BaseWrapper {...props}>
143
143
  <OriginalSelect
144
-
144
+ ref={ref}
145
145
  notFoundContent={fetching ? <Spin size="small" /> : null}
146
146
  value={value}
147
147
  {...props}
@@ -159,6 +159,7 @@ const SearchSelect = ({ addWrapper = true, form, fieldName, fieldsValue, value,
159
159
  </BaseWrapper>
160
160
  ) : (<>
161
161
  <OriginalSelect
162
+ ref={ref}
162
163
  notFoundContent={fetching ? <Spin size="small" /> : null}
163
164
  value={value}
164
165
  {...props}
@@ -176,6 +177,6 @@ const SearchSelect = ({ addWrapper = true, form, fieldName, fieldsValue, value,
176
177
  </>
177
178
  )
178
179
 
179
- }
180
+ })
180
181
 
181
182
  export { SearchSelect }
@@ -16,4 +16,7 @@ const evalFormula =(formula) => {
16
16
  return result
17
17
  };
18
18
 
19
- export {evalFormula};
19
+ export {evalFormula};
20
+
21
+
22
+