Skip to content

Commit

Permalink
Merge pull request #4443 from marmelab/allow-disabled-on-booleaninput
Browse files Browse the repository at this point in the history
Add support for disabled prop in BooleanInput
  • Loading branch information
fzaninotto authored Feb 25, 2020
2 parents acad6d7 + 5ebc7a3 commit b80e536
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ra-ui-materialui/src/input/BooleanInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const BooleanInput: FunctionComponent<
onChange,
onFocus,
options,
disabled,
parse,
resource,
source,
Expand Down Expand Up @@ -63,6 +64,7 @@ const BooleanInput: FunctionComponent<
onChange={handleChange}
{...inputProps}
{...options}
disabled={disabled}
/>
}
label={
Expand All @@ -88,6 +90,7 @@ const BooleanInput: FunctionComponent<
BooleanInput.propTypes = {
...InputPropTypes,
options: PropTypes.shape(Switch.propTypes),
disabled: PropTypes.bool,
};

BooleanInput.defaultProps = {
Expand Down

0 comments on commit b80e536

Please sign in to comment.