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:
Akshay Joshi
2021-07-28 17:46:46 +05:30
parent 09db3ddd5c
commit eb48765a5a
4 changed files with 10 additions and 9 deletions

View File

@@ -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>
);
});

View File

@@ -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'}}/>&nbsp;{option.label}
</ToggleButton>