@gm-pc/react 1.18.0-beta.0 → 1.18.0-beta.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gm-pc/react",
|
|
3
|
-
"version": "1.18.0-beta.
|
|
3
|
+
"version": "1.18.0-beta.1",
|
|
4
4
|
"description": "观麦前端基础组件库",
|
|
5
5
|
"author": "liyatang <liyatang@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/gmfe/gm-pc#readme",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@gm-common/hooks": "^2.10.0",
|
|
26
26
|
"@gm-common/tool": "^2.10.0",
|
|
27
|
-
"@gm-pc/locales": "^1.18.0-beta.
|
|
27
|
+
"@gm-pc/locales": "^1.18.0-beta.1",
|
|
28
28
|
"big.js": "^6.0.1",
|
|
29
29
|
"classnames": "^2.2.5",
|
|
30
30
|
"lodash": "^4.17.19",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"react-router-dom": "^5.2.0",
|
|
49
49
|
"react-window": "^1.8.5"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "38d92355431b842668df4dd938b549f8887f7606"
|
|
52
52
|
}
|
|
@@ -289,7 +289,14 @@ class MoreSelectBase<V extends string | number = string> extends Component<
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
private _handleMoreSelectClick = () => {
|
|
292
|
-
|
|
292
|
+
const { onClick, selected } = this.props
|
|
293
|
+
if (typeof onClick === 'function') {
|
|
294
|
+
return onClick(selected)
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
private _handlePopoverVisibleChange = (active: boolean) => {
|
|
299
|
+
if (active && this.props.searchWhenActive) {
|
|
293
300
|
const searchValue = localStorage.getItem('_GM-PC_MORESELECT_SEARCHVALUE')
|
|
294
301
|
if (searchValue) {
|
|
295
302
|
this.setState({ searchValue })
|
|
@@ -300,10 +307,6 @@ class MoreSelectBase<V extends string | number = string> extends Component<
|
|
|
300
307
|
}, 0)
|
|
301
308
|
}
|
|
302
309
|
}
|
|
303
|
-
const { onClick, selected } = this.props
|
|
304
|
-
if (typeof onClick === 'function') {
|
|
305
|
-
return onClick(selected)
|
|
306
|
-
}
|
|
307
310
|
}
|
|
308
311
|
|
|
309
312
|
render() {
|
|
@@ -340,6 +343,9 @@ class MoreSelectBase<V extends string | number = string> extends Component<
|
|
|
340
343
|
popup={this._renderList}
|
|
341
344
|
disabled={disabled}
|
|
342
345
|
isInPopup={isInPopup}
|
|
346
|
+
onVisibleChange={(active) => {
|
|
347
|
+
this._handlePopoverVisibleChange(active)
|
|
348
|
+
}}
|
|
343
349
|
>
|
|
344
350
|
{children ?? (
|
|
345
351
|
<Flex
|