mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Port Event Triggers node to react. Fixes #6578
This commit is contained in:
committed by
Akshay Joshi
parent
d1e823bf39
commit
793dbc6e7f
@@ -10,7 +10,7 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { FormInputText, FormInputSelect, FormInputSwitch, FormInputCheckbox, InputSQL, FormInputColor, FormInputFileSelect, FormInputToggle, InputSwitch } from '../components/FormComponents';
|
||||
import { FormInputText, FormInputSelect, FormInputSwitch, FormInputCheckbox, FormInputColor, FormInputFileSelect, FormInputToggle, InputSwitch, FormInputSQL } from '../components/FormComponents';
|
||||
import { InputSelect, InputText } from '../components/FormComponents';
|
||||
import Privilege from '../components/Privilege';
|
||||
import { evalFunc } from 'sources/utils';
|
||||
@@ -28,6 +28,10 @@ function MappedFormControlBase({type, value, id, onChange, className, visible, i
|
||||
onChange && onChange(value);
|
||||
});
|
||||
|
||||
const onSqlChange = useCallback((e, cm) => {
|
||||
onChange && onChange(cm.getValue());
|
||||
});
|
||||
|
||||
const onIntChange = useCallback((e) => {
|
||||
let value = e;
|
||||
if(e && e.target) {
|
||||
@@ -73,7 +77,7 @@ function MappedFormControlBase({type, value, id, onChange, className, visible, i
|
||||
case 'file':
|
||||
return <FormInputFileSelect name={name} value={value} onChange={onTextChange} className={className} {...props} />;
|
||||
case 'sql':
|
||||
return <InputSQL name={name} value={value} onChange={onTextChange} className={className} {...props}/>;
|
||||
return <FormInputSQL name={name} value={value} onChange={onSqlChange} className={className} {...props}/>;
|
||||
default:
|
||||
return <></>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user