Fixed an issue where textarea of the JSON Editor does not resize with dialog. Fixes

pull/5349/head
Yogesh Mahajan 2022-09-08 15:31:36 +05:30 committed by Akshay Joshi
parent 0c9c57e608
commit 603ce21d24
2 changed files with 8 additions and 0 deletions
web/pgadmin/static/js/components

View File

@ -31,4 +31,5 @@ Bug fixes
| `Issue #7646 <https://redmine.postgresql.org/issues/7646>`_ - Ensure that the Import/Export server menu option is visible.
| `Issue #7648 <https://redmine.postgresql.org/issues/7648>`_ - Fixed API test case for change password in the server mode.
| `Issue #7649 <https://redmine.postgresql.org/issues/7649>`_ - Fixed an issue with the non-visibility of columns added prior to import/export data.
| `Issue #7656 <https://redmine.postgresql.org/issues/7656>`_ - Fixed an issue where textarea of the JSON Editor does not resize with dialog.
| `Issue #7663 <https://redmine.postgresql.org/issues/7663>`_ - Fixed ModuleNotFoundError when running setup.py to load/dump servers.

View File

@ -20,6 +20,13 @@ export default function JsonEditor({getEditor, value, options, className}) {
modes: ['code', 'form', 'tree','preview'],
};
useEffect(()=>{
const editorResizeObserver = new ResizeObserver(()=>{
editor.current.resize();
});
editorResizeObserver.observe(eleRef.current);
}, []);
useEffect(()=>{
/* Create the object only once on mount */
editor.current = new OrigJsonEditor(eleRef.current, {