mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure the database and schema restriction controls are not shown as a drop-down. Fixes #7255
This commit is contained in:
parent
efa971edb4
commit
c2f1a7bdc5
@ -18,6 +18,7 @@ Housekeeping
|
|||||||
************
|
************
|
||||||
|
|
||||||
| `Issue #6131 <https://redmine.postgresql.org/issues/6131>`_ - Port query tool to React.
|
| `Issue #6131 <https://redmine.postgresql.org/issues/6131>`_ - Port query tool to React.
|
||||||
|
| `Issue #7255 <https://redmine.postgresql.org/issues/7255>`_ - Ensure the database and schema restriction controls are not shown as a drop-down.
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
*********
|
*********
|
||||||
|
@ -198,7 +198,7 @@ export default class DatabaseSchema extends BaseUISchema {
|
|||||||
helpMessage: gettext('Note: Changes to the schema restriction will require the Schemas node in the browser to be refreshed before they will be shown.'),
|
helpMessage: gettext('Note: Changes to the schema restriction will require the Schemas node in the browser to be refreshed before they will be shown.'),
|
||||||
helpMessageMode: ['edit', 'create'],
|
helpMessageMode: ['edit', 'create'],
|
||||||
controlProps: {
|
controlProps: {
|
||||||
multiple: true, allowClear: false, creatable: true,
|
multiple: true, allowClear: false, creatable: true, noDropdown: true, placeholder: 'Specify the schemas to be restrict...'
|
||||||
}, depChange: (state)=>{
|
}, depChange: (state)=>{
|
||||||
if(!_.isUndefined(state.oid)) {
|
if(!_.isUndefined(state.oid)) {
|
||||||
obj.informText = undefined;
|
obj.informText = undefined;
|
||||||
|
@ -415,7 +415,7 @@ export default class ServerSchema extends BaseUISchema {
|
|||||||
id: 'db_res', label: gettext('DB restriction'), type: 'select', group: gettext('Advanced'),
|
id: 'db_res', label: gettext('DB restriction'), type: 'select', group: gettext('Advanced'),
|
||||||
options: [],
|
options: [],
|
||||||
mode: ['properties', 'edit', 'create'], readonly: obj.isConnected, controlProps: {
|
mode: ['properties', 'edit', 'create'], readonly: obj.isConnected, controlProps: {
|
||||||
multiple: true, allowClear: false, creatable: true, noDropdown: true},
|
multiple: true, allowClear: false, creatable: true, noDropdown: true, placeholder: 'Specify the databases to be restrict...'},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'passfile', label: gettext('Password file'), type: 'file',
|
id: 'passfile', label: gettext('Password file'), type: 'file',
|
||||||
|
@ -895,6 +895,8 @@ export const InputSelect = forwardRef(({
|
|||||||
components: {
|
components: {
|
||||||
Option: CustomSelectOption,
|
Option: CustomSelectOption,
|
||||||
SingleValue: CustomSelectSingleValue,
|
SingleValue: CustomSelectSingleValue,
|
||||||
|
IndicatorSeparator: (props) => controlProps.noDropdown ? null: <RSComponents.IndicatorSeparator {...props} />,
|
||||||
|
DropdownIndicator: (props) => controlProps.noDropdown ? null: <RSComponents.DropdownIndicator {...props} />
|
||||||
},
|
},
|
||||||
isMulti: Boolean(controlProps.multiple),
|
isMulti: Boolean(controlProps.multiple),
|
||||||
openMenuOnClick: !readonly,
|
openMenuOnClick: !readonly,
|
||||||
@ -915,7 +917,13 @@ export const InputSelect = forwardRef(({
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<CreatableSelect ref={ref} {...commonProps} />
|
<CreatableSelect
|
||||||
|
ref={ref}
|
||||||
|
{...commonProps}
|
||||||
|
noOptionsMessage={() =>
|
||||||
|
!controlProps.noDropdown ? 'No options' : null
|
||||||
|
}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user