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

Function onSaveClick

web/pgadmin/static/js/SchemaView/SchemaDialogView.jsx:122–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120 };
121
122 const onSaveClick = () => {
123 // Do nothing when there is no change or there is an error
124 if (
125 !schemaState._changes || Object.keys(schemaState._changes).length === 0 ||
126 schemaState.errors.name
127 ) return;
128
129 setSaving(true);
130 setLoaderText(schemaState.customLoadingText || gettext('Saving...'));
131
132 if (!schema.warningText) {
133 save(schemaState.changes(true));
134 return;
135 }
136
137 Notifier.confirm(
138 gettext('Warning'),
139 schema.warningText,
140 () => { save(schemaState.changes(true)); },
141 () => {
142 setSaving(false);
143 setLoaderText('');
144 return true;
145 },
146 );
147 };
148
149 const getSQLValue = () => {
150 // Called when SQL tab is active.

Callers

nothing calls this directly

Calls 6

setSavingFunction · 0.85
setLoaderTextFunction · 0.85
gettextFunction · 0.85
changesMethod · 0.80
confirmMethod · 0.80
saveFunction · 0.70

Tested by

no test coverage detected