@sheinx/base 3.5.2-beta.8 → 3.5.2-fix.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAcnE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,eAgvBxE;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAcnE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,eAwvBxE;AAED,eAAe,MAAM,CAAC"}
@@ -236,6 +236,12 @@ function Select(props0) {
236
236
  if (props.absolute === undefined) return;
237
237
  setAbsoluteListUpdateKey(value);
238
238
  });
239
+ var handleSameChange = function handleSameChange() {
240
+ var shouldFocus = showInput && props.reFocus;
241
+ if (!multiple && !shouldFocus) {
242
+ closePop();
243
+ }
244
+ };
239
245
  var _useSelect = (0, _hooks.useSelect)({
240
246
  value: valueProp,
241
247
  data: data,
@@ -251,6 +257,7 @@ function Select(props0) {
251
257
  prediction: prediction,
252
258
  beforeChange: beforeChange,
253
259
  onChange: handleSelectChange,
260
+ onSameChange: handleSameChange,
254
261
  filterSameChange: filterSameChange,
255
262
  noCache: noCache
256
263
  }),
@@ -32,7 +32,8 @@ var Scroll = function Scroll(props) {
32
32
  _props$defaultHeight = props.defaultHeight,
33
33
  defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
34
34
  var _useResize = (0, _hooks.useResize)({
35
- targetRef: containerRef
35
+ targetRef: containerRef,
36
+ timer: 0
36
37
  }),
37
38
  width = _useResize.width,
38
39
  h = _useResize.height;
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAcnE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,eAgvBxE;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AAcnE,iBAAS,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,eAwvBxE;AAED,eAAe,MAAM,CAAC"}
@@ -229,6 +229,12 @@ function Select(props0) {
229
229
  if (props.absolute === undefined) return;
230
230
  setAbsoluteListUpdateKey(value);
231
231
  });
232
+ var handleSameChange = function handleSameChange() {
233
+ var shouldFocus = showInput && props.reFocus;
234
+ if (!multiple && !shouldFocus) {
235
+ closePop();
236
+ }
237
+ };
232
238
  var _useSelect = useSelect({
233
239
  value: valueProp,
234
240
  data: data,
@@ -244,6 +250,7 @@ function Select(props0) {
244
250
  prediction: prediction,
245
251
  beforeChange: beforeChange,
246
252
  onChange: handleSelectChange,
253
+ onSameChange: handleSameChange,
247
254
  filterSameChange: filterSameChange,
248
255
  noCache: noCache
249
256
  }),
@@ -25,7 +25,8 @@ var Scroll = function Scroll(props) {
25
25
  _props$defaultHeight = props.defaultHeight,
26
26
  defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
27
27
  var _useResize = useResize({
28
- targetRef: containerRef
28
+ targetRef: containerRef,
29
+ timer: 0
29
30
  }),
30
31
  width = _useResize.width,
31
32
  h = _useResize.height;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.5.2-beta.8",
3
+ "version": "3.5.2-fix.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.5.2-beta.8",
13
+ "@sheinx/hooks": "3.5.2-fix.1",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"