mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 19:38:16 +08:00
option value为0时,回显问题
This commit is contained in:
parent
e615764dbb
commit
202b19c882
@ -122,7 +122,7 @@ export function expandValue(
|
||||
value &&
|
||||
value.hasOwnProperty(valueField || 'value')
|
||||
) {
|
||||
value = (value as Option)[valueField || 'value'] || '';
|
||||
value = (value as Option)[valueField || 'value'] ?? '';
|
||||
}
|
||||
|
||||
return findTree(
|
||||
@ -280,6 +280,8 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
||||
this.handleEditClick = this.handleEditClick.bind(this);
|
||||
this.handleDeleteClick = this.handleDeleteClick.bind(this);
|
||||
|
||||
// console.log('props.value', props.value);
|
||||
|
||||
this.state = {
|
||||
isOpen: props.defaultOpen || false,
|
||||
isFocused: false,
|
||||
@ -547,6 +549,7 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
||||
} = this.props;
|
||||
|
||||
const selection = this.state.selection;
|
||||
// console.log('selection', selection);
|
||||
|
||||
if (!selection.length) {
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user