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

Function save

web/pgadmin/static/js/SchemaView/SchemaDialogView.jsx:100–120  ·  view source on GitHub ↗
(changeData)

Source from the content-addressed store, hash-verified

98 };
99
100 const save = (changeData) => {
101 props.onSave(schemaState.isNew, changeData)
102 .then(()=>{
103 if(schema.informText) {
104 Notifier.alert(
105 gettext('Warning'),
106 schema.informText,
107 );
108 }
109 }).catch((err)=>{
110 schemaState.setError({
111 name: 'apierror',
112 message: _.escape(parseApiError(err)),
113 });
114 }).finally(()=>{
115 if(checkIsMounted()) {
116 setSaving(false);
117 setLoaderText('');
118 }
119 });
120 };
121
122 const onSaveClick = () => {
123 // Do nothing when there is no change or there is an error

Callers 1

onSaveClickFunction · 0.70

Calls 7

parseApiErrorFunction · 0.90
gettextFunction · 0.85
setSavingFunction · 0.85
setLoaderTextFunction · 0.85
alertMethod · 0.80
setErrorMethod · 0.80
escapeMethod · 0.80

Tested by

no test coverage detected