MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / checkDisabled

Function checkDisabled

web/pgadmin/static/js/SchemaView/SaveButton.jsx:22–29  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

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

Callers 2

SaveButtonFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected