File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,8 +19,9 @@ export default [{
1919 const disabled = trueish ( props , 'aria-disabled' ) ;
2020 const readOnly = trueish ( props , 'aria-readonly' ) ;
2121 const onChange = listensTo ( props , 'onChange' ) ;
22+ const onBlur = listensTo ( props , 'onBlur' ) ;
2223
23- return hidden || disabled || readOnly || ! onChange ;
24+ return hidden || disabled || readOnly || ! onChange || ( onChange && onBlur ) ;
2425 }
2526} ] ;
2627
@@ -37,10 +38,13 @@ export const pass = [{
3738} , {
3839 when : 'the element is aria-readonly' ,
3940 render : React => < input onChange = { fn } aria-readonly />
41+ } , {
42+ when : 'the `onChange` prop is present along with an `onBlur` prop' ,
43+ render : React => < input onChange = { fn } onBlur = { fn } />
4044} ] ;
4145
4246export const fail = [ {
43- when : 'the `onChange` prop is present' ,
47+ when : 'the `onChange` prop is present without an `onBlur` prop ' ,
4448 render : React => < input onChange = { fn } />
4549} ] ;
4650
You can’t perform that action at this time.
0 commit comments