| | |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) |
| | | return !is(fromJS(this.state), fromJS(nextState)) || !is(fromJS(this.props.children), fromJS(nextProps.children)) |
| | | } |
| | | |
| | | trigger = () => { |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { title, width, children } = this.props |
| | | const { title, width, children, double } = this.props |
| | | const { visible, dict, formlist } = this.state |
| | | |
| | | return ( |
| | | <div className="normal-form-wrap"> |
| | | <span onClick={this.trigger}>{children}</span> |
| | | <> |
| | | {!double ? <span onClick={this.trigger}>{children}</span> : <span onDoubleClick={this.trigger}>{children}</span>} |
| | | <Modal |
| | | wrapClassName="popview-modal" |
| | | title={title} |
| | |
| | | wrappedComponentRef={(inst) => this.Ref = inst} |
| | | /> |
| | | </Modal> |
| | | </div> |
| | | </> |
| | | ) |
| | | } |
| | | } |