@gm-pc/react 1.5.7 → 1.6.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.
|
|
3
|
+
"version": "1.6.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.
|
|
27
|
+
"@gm-pc/locales": "^1.6.1",
|
|
28
28
|
"big.js": "^6.0.1",
|
|
29
29
|
"classnames": "^2.2.5",
|
|
30
30
|
"lodash": "^4.17.19",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react-dom": "^16.14.0",
|
|
47
47
|
"react-window": "^1.8.5"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "78bdefef724fe423e488a6513f25b6bb4f695211"
|
|
50
50
|
}
|
|
@@ -211,6 +211,7 @@ class MoreSelectBase<V extends string | number = string> extends Component<
|
|
|
211
211
|
searchPlaceholder,
|
|
212
212
|
listHeight,
|
|
213
213
|
popupClassName,
|
|
214
|
+
renderCustomizedBottom,
|
|
214
215
|
} = this.props
|
|
215
216
|
const { loading, searchValue, willActiveIndex } = this.state
|
|
216
217
|
const filterData = this._getFilterData()
|
|
@@ -253,6 +254,10 @@ class MoreSelectBase<V extends string | number = string> extends Component<
|
|
|
253
254
|
/>
|
|
254
255
|
)}
|
|
255
256
|
</div>
|
|
257
|
+
{!loading &&
|
|
258
|
+
!!filterData.length &&
|
|
259
|
+
renderCustomizedBottom &&
|
|
260
|
+
renderCustomizedBottom(this._popoverRef)}
|
|
256
261
|
</div>
|
|
257
262
|
)
|
|
258
263
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Popover } from '@gm-pc/react'
|
|
1
2
|
import { CSSProperties, ReactNode, KeyboardEvent } from 'react'
|
|
2
3
|
|
|
3
4
|
/** 普通的数据格式 */
|
|
@@ -34,6 +35,9 @@ interface MoreSelectCommonProps<V extends string | number = string> {
|
|
|
34
35
|
/** 自定义渲染列表项 */
|
|
35
36
|
renderListItem?(value: MoreSelectDataItem<V>, index: number): ReactNode
|
|
36
37
|
|
|
38
|
+
/** 自定义popup底部渲染 */
|
|
39
|
+
renderCustomizedBottom?(ref: React.RefObject<Popover>): ReactNode
|
|
40
|
+
|
|
37
41
|
listHeight?: string
|
|
38
42
|
isGroupList?: boolean
|
|
39
43
|
popoverType?: 'focus' | 'realFocus'
|