Skip to content

Commit 21a91ce

Browse files
committed
fix: replace cluster ro property with row property
1 parent 32df6dc commit 21a91ce

File tree

1 file changed

+7
-3
lines changed
  • frontend/src/components/Brokers/Broker/Configs/TableComponents/InputCell

1 file changed

+7
-3
lines changed

frontend/src/components/Brokers/Broker/Configs/TableComponents/InputCell/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
UpdateBrokerConfigCallback,
88
} from 'components/Brokers/Broker/Configs/lib/types';
99
import { getConfigUnit } from 'components/Brokers/Broker/Configs/lib/utils';
10-
import ClusterContext from 'components/contexts/ClusterContext';
1110

1211
import InputCellViewMode from './InputCellViewMode';
1312
import InputCellEditMode from './InputCellEditMode';
@@ -20,7 +19,13 @@ export interface InputCellProps
2019
const InputCell: FC<InputCellProps> = ({ row, onUpdate }) => {
2120
const [isEdit, setIsEdit] = useState(false);
2221
const confirm = useConfirm();
23-
const { name, source, value: initialValue, isSensitive } = row.original;
22+
const {
23+
name,
24+
source,
25+
value: initialValue,
26+
isSensitive,
27+
isReadOnly,
28+
} = row.original;
2429

2530
const handleSave = (newValue: string) => {
2631
if (newValue !== initialValue) {
@@ -33,7 +38,6 @@ const InputCell: FC<InputCellProps> = ({ row, onUpdate }) => {
3338

3439
const isDynamic = source === 'DYNAMIC_BROKER_CONFIG';
3540
const configUnit = getConfigUnit(name);
36-
const { isReadOnly } = useContext(ClusterContext);
3741

3842
return isEdit ? (
3943
<InputCellEditMode

0 commit comments

Comments
 (0)