(state)
| 20 | const [key, setKey] = useState(0); |
| 21 | const schemaState = useContext(SchemaStateContext); |
| 22 | const checkDisabled = (state) => { |
| 23 | const {isDirty, isSaving, errors} = state; |
| 24 | return ( |
| 25 | isSaving || |
| 26 | !(mode === 'edit' || checkDirtyOnEnableSave ? isDirty : true) || |
| 27 | Boolean(errors.name) |
| 28 | ); |
| 29 | }; |
| 30 | const currState = schemaState.state(); |
| 31 | const isDisabled = checkDisabled(currState); |
| 32 |
no outgoing calls
no test coverage detected