mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-11-02 20:30:17 -06:00
All the issues are fixed reported in #7884
* Show the icon for the 'Reset' button. (Reference #7884) * Reload the server list after connecting to a server in the 'New connection' dialog (QueryTool). (Reference: #7884) * Pass the grid path during the bulk update (click on a radio action) * Don't assign the cell value to the 'rowValue' variable.
This commit is contained in:
1 parent
d3d1eb3355
commit
e21911b1c6
4 files changed
+96
-65
No files matched your search
@@ -27,7 +27,7 @@ export function getMappedCell({field}) {
|
||||
|
||||
const [key, setKey] = useState(0);
|
||||
const schemaState = useContext(SchemaStateContext);
|
||||
const { dataDispatch } = useContext(DataGridContext);
|
||||
const { dataDispatch, accessPath } = useContext(DataGridContext);
|
||||
const { rowAccessPath, row } = useContext(DataGridRowContext);
|
||||
const colAccessPath = schemaState.accessPath(rowAccessPath, field.id);
|
||||
|
||||
@@ -44,7 +44,6 @@ export function getMappedCell({field}) {
|
||||
colOptions = { disabled: true, readonly: true };
|
||||
} else {
|
||||
colOptions['readonly'] = !colOptions['editable'];
|
||||
rowValue = value;
|
||||
}
|
||||
|
||||
let cellProps = {};
|
||||
@@ -70,7 +69,7 @@ export function getMappedCell({field}) {
|
||||
if(field.radioType) {
|
||||
dataDispatch({
|
||||
type: SCHEMA_STATE_ACTIONS.BULK_UPDATE,
|
||||
path: rowAccessPath,
|
||||
path: accessPath,
|
||||
value: changeValue,
|
||||
id: field.id
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@ import { DefaultButton } from 'sources/components/Buttons';
|
||||
import { SchemaStateContext } from './SchemaState';
|
||||
|
||||
|
||||
export function ResetButton({label, Icon, onClick}) {
|
||||
export function ResetButton({label, icon, onClick}) {
|
||||
const [key, setKey] = useState(0);
|
||||
const schemaState = useContext(SchemaStateContext);
|
||||
const checkDisabled = (state) => (state.isSaving || !state.isDirty);
|
||||
@@ -33,7 +33,7 @@ export function ResetButton({label, Icon, onClick}) {
|
||||
return (
|
||||
<DefaultButton
|
||||
data-test='Reset' onClick={onClick}
|
||||
startIcon={Icon}
|
||||
startIcon={icon}
|
||||
disabled={isDisabled}
|
||||
className='Dialog-buttonMargin'>
|
||||
{ label }
|
||||
|
||||
@@ -27,6 +27,7 @@ export default class BaseUISchema {
|
||||
|
||||
this._state = null;
|
||||
this._id = Date.now();
|
||||
this._dynamicFields = false;
|
||||
}
|
||||
|
||||
/* Top schema is helpful if this is used as child */
|
||||
@@ -96,9 +97,8 @@ export default class BaseUISchema {
|
||||
*/
|
||||
get fields() {
|
||||
if (!this.__filteredFields) {
|
||||
// Memoize the results
|
||||
this.__filteredFields = memoizeFn(
|
||||
(baseFields, keys, filterGroups) => baseFields.filter((field) => {
|
||||
const getFields = (baseFields, keys, filterGroups) => baseFields.filter(
|
||||
(field) => {
|
||||
let retval;
|
||||
|
||||
// If any groups are to be filtered.
|
||||
@@ -110,8 +110,12 @@ export default class BaseUISchema {
|
||||
}
|
||||
|
||||
return retval;
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
// Memoize the results (if required)
|
||||
this.__filteredFields =
|
||||
this._dynamicFields ? getFields : memoizeFn(getFields);
|
||||
}
|
||||
|
||||
return this.__filteredFields(
|
||||
|
||||
Reference in new issue
Block a user