Browse Source

feat: update checkbox

pull/1938/head
tanjinzhou 5 years ago
parent
commit
4c17169436
  1. 1
      components/checkbox/Checkbox.jsx
  2. 1
      components/checkbox/Group.jsx

1
components/checkbox/Checkbox.jsx

@ -95,6 +95,7 @@ export default {
checkboxProps.props.name = checkboxGroup.name;
checkboxProps.props.checked = checkboxGroup.sValue.indexOf(props.value) !== -1;
checkboxProps.props.disabled = props.disabled || checkboxGroup.disabled;
checkboxProps.props.indeterminate = indeterminate;
} else {
checkboxProps.on.change = this.handleChange;
}

1
components/checkbox/Group.jsx

@ -99,6 +99,7 @@ export default {
prefixCls={prefixCls}
key={option.value.toString()}
disabled={'disabled' in option ? option.disabled : props.disabled}
indeterminate={option.indeterminate}
value={option.value}
checked={state.sValue.indexOf(option.value) !== -1}
onChange={option.onChange || noop}

Loading…
Cancel
Save