You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
When I create a custom component input and I'm passing all props from the parent, sometimes I want to disable some of them. In the example below I don't want to allow the user to be able to override type.
But it is not possible now. I would like to add something like PT.disabled to warn users, that this prop is prohibited to change.
constNumberInput=(props)=>{const{ type, className, ...rest}=props;return<inputtype="number"{...rest}className={classnames(inputStyles.number)+' '+className}/>;};NumberInput.propTypes={className: PT.string,type: PT.disabled,// Here, warn user type is not available property};exportdefaultNumberInput;
Would it be possible to add something like this?
The text was updated successfully, but these errors were encountered:
When I create a custom component input and I'm passing all
props
from the parent, sometimes I want to disable some of them. In the example below I don't want to allow the user to be able to overridetype
.But it is not possible now. I would like to add something like
PT.disabled
to warn users, that this prop is prohibited to change.Would it be possible to add something like this?
The text was updated successfully, but these errors were encountered: