mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
- Fix codemirror cursor issue. - Fix foreign table jasmine test cases.
This commit is contained in:
committed by
Akshay Joshi
parent
c8026873b4
commit
2a76027cce
@@ -42,7 +42,9 @@ export default function CodeMirror({currEditor, name, value, options, events, cl
|
||||
|
||||
useMemo(() => {
|
||||
if(editor.current) {
|
||||
editor.current.setValue(value);
|
||||
if(value != editor.current.getValue()) {
|
||||
editor.current.setValue(value);
|
||||
}
|
||||
}
|
||||
}, [value]);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
/* Common form components used in pgAdmin */
|
||||
|
||||
import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import React, { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Box, FormControl, OutlinedInput, FormHelperText,
|
||||
Grid, IconButton, FormControlLabel, Switch, Checkbox, useTheme, InputLabel, Paper } from '@material-ui/core';
|
||||
@@ -149,7 +149,7 @@ export function InputSQL({value, options, onChange, readonly, className, ...prop
|
||||
}
|
||||
}, [readonly]);
|
||||
|
||||
return useMemo(()=>(
|
||||
return (
|
||||
<CodeMirror
|
||||
currEditor={(obj)=>editor.current=obj}
|
||||
value={value||''}
|
||||
@@ -166,13 +166,14 @@ export function InputSQL({value, options, onChange, readonly, className, ...prop
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
), [value]);
|
||||
);
|
||||
}
|
||||
InputSQL.propTypes = {
|
||||
value: PropTypes.string,
|
||||
options: PropTypes.object,
|
||||
onChange: PropTypes.func,
|
||||
readonly: PropTypes.bool
|
||||
readonly: PropTypes.bool,
|
||||
className: CustomPropTypes.className,
|
||||
};
|
||||
|
||||
export function FormInputSQL({hasError, required, label, className, helpMessage, testcid, value, controlProps, noLabel, ...props}) {
|
||||
|
||||
Reference in New Issue
Block a user