diff --git a/docs/en_US/release_notes_8_1.rst b/docs/en_US/release_notes_8_1.rst index 0838f72e9..4e1e83610 100644 --- a/docs/en_US/release_notes_8_1.rst +++ b/docs/en_US/release_notes_8_1.rst @@ -39,3 +39,4 @@ Bug fixes | `Issue #6984 `_ - Fixed an issue where the Vacuum option INDEX_CLEANUP have an incorrect value ('AUTO') for database versions < 14. | `Issue #6989 `_ - Fixed an issue where the pgAdmin page went blank when clicking the delete button in the User Management dialog. | `Issue #7000 `_ - Ensure that correct timezone is set for Docker deployments. + | `Issue #7017 `_ - Fixed an issue where schema diff tool is not loading preferences on start. diff --git a/web/pgadmin/static/js/helpers/withStandardTabInfo.jsx b/web/pgadmin/static/js/helpers/withStandardTabInfo.jsx index d4715a272..d2f4c0dcc 100644 --- a/web/pgadmin/static/js/helpers/withStandardTabInfo.jsx +++ b/web/pgadmin/static/js/helpers/withStandardTabInfo.jsx @@ -32,9 +32,9 @@ export default function withStandardTabInfo(Component, tabId) { const onTabActive = _.debounce(()=>{ if(layoutDocker.isTabVisible(tabId)) { - !isActive && setIsActive(true); + setIsActive(true); } else { - isActive && setIsActive(false); + setIsActive(false); } }, 100); diff --git a/web/pgadmin/tools/schema_diff/static/js/SchemaDiffModule.js b/web/pgadmin/tools/schema_diff/static/js/SchemaDiffModule.js index 844761fd1..ba293213d 100644 --- a/web/pgadmin/tools/schema_diff/static/js/SchemaDiffModule.js +++ b/web/pgadmin/tools/schema_diff/static/js/SchemaDiffModule.js @@ -20,7 +20,7 @@ import ModalProvider from '../../../../static/js/helpers/ModalProvider'; import SchemaDiffComponent from './components/SchemaDiffComponent'; import { BROWSER_PANELS } from '../../../../browser/static/js/constants'; import { NotifierProvider } from '../../../../static/js/helpers/Notifier'; -import usePreferences from '../../../../preferences/static/js/store'; +import usePreferences, { listenPreferenceBroadcast } from '../../../../preferences/static/js/store'; import pgAdmin from 'sources/pgadmin'; import { PgAdminContext } from '../../../../static/js/BrowserComponent'; @@ -100,7 +100,9 @@ export default class SchemaDiff { return true; } - load(container, trans_id) { + async load(container, trans_id) { + await listenPreferenceBroadcast(); + ReactDOM.render( diff --git a/web/pgadmin/tools/schema_diff/static/js/components/InputComponent.jsx b/web/pgadmin/tools/schema_diff/static/js/components/InputComponent.jsx index 1132c5dd3..1241de938 100644 --- a/web/pgadmin/tools/schema_diff/static/js/components/InputComponent.jsx +++ b/web/pgadmin/tools/schema_diff/static/js/components/InputComponent.jsx @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import _ from 'lodash'; import PropTypes from 'prop-types'; import React, { useContext, useState } from 'react'; @@ -77,12 +76,11 @@ export function InputComponent({ label, serverList, databaseList, schemaList, di container direction="row" alignItems="center" - key={_.uniqueId('c')} > - + {label} - + - + - + - + - + } onClick={onHelpClick} /> @@ -739,9 +738,8 @@ export function SchemaDiffCompare({ params }) { container direction="row" alignItems="center" - key={_.uniqueId('c')} > - + - +