mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Fixed 'Material-UI: You are providing a disabled button
child to the Tooltip' 2) Fixed InputToggle value issue. 3) Fixed jasmine test for Language. 4) Remove unused code from the view node.
This commit is contained in:
parent
09db3ddd5c
commit
eb48765a5a
@ -97,9 +97,6 @@ export default class ViewSchema extends BaseUISchema {
|
||||
type: 'sql', mode: ['create', 'edit'], group: gettext('Code'),
|
||||
isFullTab: true,
|
||||
disabled: obj.notInSchema,
|
||||
controlProps: {
|
||||
className: ['sql-code-control'],
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
@ -117,7 +114,6 @@ export default class ViewSchema extends BaseUISchema {
|
||||
editable: false, type: 'collection',
|
||||
canEdit: false, group: gettext('Security'), canDelete: true,
|
||||
mode: ['edit', 'create'], canAdd: true,
|
||||
control: 'unique-col-collection',
|
||||
uniqueCol : ['provider'],
|
||||
}
|
||||
];
|
||||
|
@ -92,9 +92,11 @@ export const PgIconButton = forwardRef(({icon, title, className, ...props}, ref)
|
||||
/* Tooltip does not work for disabled items */
|
||||
return (
|
||||
<Tooltip title={title || ''} aria-label={title || ''}>
|
||||
<DefaultButton ref={ref} style={{minWidth: 0}} className={clsx(classes.iconButton, className)} {...props}>
|
||||
{icon}
|
||||
</DefaultButton>
|
||||
<span>
|
||||
<DefaultButton ref={ref} style={{minWidth: 0}} className={clsx(classes.iconButton, className)} {...props}>
|
||||
{icon}
|
||||
</DefaultButton>
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
});
|
||||
|
@ -392,7 +392,7 @@ export function InputToggle({cid, value, onChange, options, disabled, readonly,
|
||||
const isSelected = option.value === value;
|
||||
const isDisabled = disabled || (readonly && isSelected);
|
||||
return (
|
||||
<ToggleButton key={option.label} value={option.value || ''} component={isSelected ? PrimaryButton : DefaultButton}
|
||||
<ToggleButton key={option.label} value={option.value} component={isSelected ? PrimaryButton : DefaultButton}
|
||||
disabled={isDisabled} aria-label={option.label}>
|
||||
<CheckRoundedIcon style={{visibility: isSelected ? 'visible': 'hidden'}}/> {option.label}
|
||||
</ToggleButton>
|
||||
|
@ -114,10 +114,13 @@ describe('LanguageSchema', ()=>{
|
||||
let state = {};
|
||||
let setError = jasmine.createSpy('setError');
|
||||
|
||||
state.lanproc = null;
|
||||
state.lanproc = '';
|
||||
schemaObj.validate(state, setError);
|
||||
expect(setError).toHaveBeenCalledWith('lanproc', 'Handler function cannot be empty.');
|
||||
|
||||
state.lanproc = 'my_len';
|
||||
schemaObj.validate(state, setError);
|
||||
expect(setError).toHaveBeenCalledWith('lanproc', null);
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user