ronds-metadata 1.2.53 → 1.2.54
Sign up to get free protection for your applications and to get access to all the features.
@@ -37,7 +37,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
37
37
|
/*
|
38
38
|
* @Author:wangxian
|
39
39
|
* @Date: 2021-09-18 14:15:04
|
40
|
-
* @LastEditTime: 2023-05-18
|
40
|
+
* @LastEditTime: 2023-05-18 16:47:45
|
41
41
|
*/
|
42
42
|
import React from 'react';
|
43
43
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
@@ -381,7 +381,7 @@ function Index(props) {
|
|
381
381
|
};
|
382
382
|
var onDropdownVisibleChange = function onDropdownVisibleChange(_open) {
|
383
383
|
setTreeselectOpen(_open);
|
384
|
-
if (_open && expandedKeys.length > 0 && treeRef.current && treeData.length > 0) {
|
384
|
+
if (_open && expandedKeys.length > 0 && treeRef.current && treeData.length > 0 && firstLoadTreeSelectRef.current) {
|
385
385
|
setTimeout(function () {
|
386
386
|
var idx = findTopParentIndex(treeData, expandedKeys[0]);
|
387
387
|
treeRef.current.scrollTo({
|
@@ -7,6 +7,5 @@ export var STREAM_EVENT_TYPE = {
|
|
7
7
|
ON_SELECT_CHANGE: 'onSelectChange',
|
8
8
|
ON_BUTTON_CELL_CLICK: 'onButtonCellClick',
|
9
9
|
ON_VALUES_CHANGE: 'onValuesChange',
|
10
|
-
ON_WATCH_DEPEND: 'onWatchDepend'
|
11
|
-
ON_DROPDOWN_VISIBLE_CHANGE: 'onDropdownVisibleChange'
|
10
|
+
ON_WATCH_DEPEND: 'onWatchDepend'
|
12
11
|
};
|
@@ -66,13 +66,6 @@ interface IMetadataFormProps {
|
|
66
66
|
* select选择的回调
|
67
67
|
*/
|
68
68
|
onSelectChange?: (changedValues: any) => void;
|
69
|
-
/**
|
70
|
-
* TreeSelect展开下拉菜单的回调
|
71
|
-
*/
|
72
|
-
onDropdownVisibleChange?: (data: {
|
73
|
-
treeRef: any;
|
74
|
-
key: string;
|
75
|
-
}) => void;
|
76
69
|
/**
|
77
70
|
* 有按钮的表格点击事件
|
78
71
|
*/
|
@@ -41,7 +41,6 @@ var MetadataForm = function MetadataForm(props) {
|
|
41
41
|
getFormInstance = props.getFormInstance,
|
42
42
|
onValuesChange = props.onValuesChange,
|
43
43
|
onSelectChange = props.onSelectChange,
|
44
|
-
onDropdownVisibleChange = props.onDropdownVisibleChange,
|
45
44
|
onCellButtonClick = props.onCellButtonClick;
|
46
45
|
var _React$useState = React.useState([]),
|
47
46
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
@@ -69,9 +68,6 @@ var MetadataForm = function MetadataForm(props) {
|
|
69
68
|
case STREAM_EVENT_TYPE.ON_SELECT_CHANGE:
|
70
69
|
onSelectChange && onSelectChange(p.payload);
|
71
70
|
break;
|
72
|
-
case STREAM_EVENT_TYPE.ON_DROPDOWN_VISIBLE_CHANGE:
|
73
|
-
onDropdownVisibleChange && onDropdownVisibleChange(p.payload);
|
74
|
-
break;
|
75
71
|
case STREAM_EVENT_TYPE.ON_BUTTON_CELL_CLICK:
|
76
72
|
onCellButtonClick && onCellButtonClick(p.payload);
|
77
73
|
break;
|