mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-24 23:05:29 +08:00
dbeaver/pro#6253 [CB] [users] default team should be marked and read only (#3658)
* dbeaver/pro#6253 fix: set disable state for checkbox respecting readonly There was a bug in UiKitCheckbox props which rewrites disabled state using only disabled prop. * dbeaver/pro#6253 fix: remove redundant readonly property in Options First of all, Radio doesn't support readonly attribute. Moreover, we don't render this RadioGroup when condition in readonly prop is true. --------- Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
This commit is contained in:
co-authored by
Daria Marutkina
parent
9276777c3e
commit
576028b367
@@ -36,13 +36,14 @@ export const CheckboxMarkup: React.FC<ICheckboxMarkupProps> = function CheckboxM
|
||||
title,
|
||||
readOnly,
|
||||
children,
|
||||
disabled,
|
||||
...rest
|
||||
}) {
|
||||
const styles = useS(CheckboxMarkupStyles);
|
||||
|
||||
return (
|
||||
<div className={s(styles, { container: true }, 'checkbox-markup', `checkbox-markup-theme--${theme}`, className)} title={title}>
|
||||
<UiKitCheckbox id={id || rest.name} indeterminate={indeterminate} disabled={rest.disabled || readOnly} size={size} {...rest}>
|
||||
<UiKitCheckbox id={id || rest.name} indeterminate={indeterminate} disabled={disabled || readOnly} size={size} {...rest}>
|
||||
{label && <span className={s(styles, { label: true }, 'checkbox-markup__label')}>{label}</span>}
|
||||
{caption && <span className={s(styles, { caption: true }, 'checkbox-markup__caption')}>{caption}</span>}
|
||||
</UiKitCheckbox>
|
||||
|
||||
@@ -206,15 +206,7 @@ export const Options: TabContainerPanelComponent<IConnectionFormProps> = observe
|
||||
<Container gap>
|
||||
<RadioGroup aria-label={configurationTypeLabel} name="configurationType" state={optionsPart.state}>
|
||||
{configurationTypes.map(conf => (
|
||||
<Radio
|
||||
key={conf.value}
|
||||
id={conf.value}
|
||||
value={conf.value}
|
||||
readOnly={readonly || configurationTypes.length < 2}
|
||||
disabled={readonly}
|
||||
small
|
||||
keepSize
|
||||
>
|
||||
<Radio key={conf.value} id={conf.value} value={conf.value} disabled={readonly} small keepSize>
|
||||
{conf.name}
|
||||
</Radio>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user