| | |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | const { config } = this.props |
| | | const { config } = this.state |
| | | |
| | | if (!is(fromJS(config.oriOptions), fromJS(nextProps.config.oriOptions))) { |
| | | this.setState({ |
| | | config: fromJS(nextProps.config).toJS(), |
| | | config: {...config, oriOptions: nextProps.config.oriOptions}, |
| | | options: fromJS(nextProps.config.options).toJS() |
| | | }) |
| | | } |
| | |
| | | getCards = () => { |
| | | const { selectKeys, options, config } = this.state |
| | | const { display, width, fields, picratio, multiple, backgroundColor, selectStyle, selectClass } = config |
| | | |
| | | |
| | | if (options.length === 0) { |
| | | return null |
| | | } else if (display === 'color') { |