| | |
| | | |
| | | let _type = props.card.type |
| | | if (props.type === 'columns') { |
| | | if (_type !== 'picture') { |
| | | if (_type === 'date' || _type === 'datetime') { |
| | | _type = 'text' |
| | | } |
| | | } else if (props.type === 'search') { |
| | | if (_type === 'number') { |
| | | _type = 'text' |
| | | } else if (_type === 'datetime') { |
| | | _type = 'date' |
| | | _type = 'daterange' |
| | | } |
| | | } |
| | | |
| | |
| | | const { card } = this.state |
| | | this.setState({ |
| | | card: {...card, type: e.target.value} |
| | | }, () => { |
| | | this.props.changeCard(this.state.card) |
| | | }) |
| | | } |
| | | |
| | |
| | | {type === 'columns' ? |
| | | <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected}> |
| | | <Radio value="text">text</Radio> |
| | | <Radio value="number">number</Radio> |
| | | <Radio value="picture">picture</Radio> |
| | | </Radio.Group> : null |
| | | } |