()
| 57 | } |
| 58 | |
| 59 | async componentDidMount() { |
| 60 | const { currColId, fetchVariableParamsList, clickValue } = this.props; |
| 61 | let result = await fetchVariableParamsList(currColId); |
| 62 | let records = result.payload.data.data; |
| 63 | this.records = records.sort((a, b) => { |
| 64 | return a.index - b.index; |
| 65 | }); |
| 66 | this.handleRecordsData(this.props.id); |
| 67 | |
| 68 | if (clickValue) { |
| 69 | let isArrayParams = clickValue.lastIndexOf(']') === clickValue.length - 1; |
| 70 | let key = isArrayParams ? deleteLastArr(clickValue) : deleteLastObject(clickValue); |
| 71 | this.setState({ |
| 72 | expandedKeys: [key], |
| 73 | selectedKeys: [CanSelectPathPrefix + clickValue] |
| 74 | }); |
| 75 | // this.props.click(clickValue); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | async componentWillReceiveProps(nextProps) { |
| 80 | if (this.records && nextProps.id && this.id !== nextProps.id) { |
nothing calls this directly
no test coverage detected