Skip to content

Commit

Permalink
fix(portal): fix sonata apis editable when is not customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
james-tran-3005 committed Dec 9, 2024
1 parent b9135a1 commit d761d3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect, useState } from "react";
import { InputProps } from "antd";

export function AutoGrowingInput({
prefix, suffix, className, value, placeholder, onChange, onBlur, ...rest
prefix, suffix, className, value, placeholder,disabled, onChange, onBlur, ...rest
}: Readonly<{ value?: string; onChange?: (value: string) => void } & Omit<InputProps, 'value' | 'onChange'>>) {
const [text, setText] = useState<string>('')
const [isFocused, setIsFocused] = useState(false)
Expand Down Expand Up @@ -34,7 +34,7 @@ export function AutoGrowingInput({
onBlur?.(e as any)
}}
onKeyDown={e => {
if (e.key === 'Enter') {
if (e.key === 'Enter' || disabled) {
e.preventDefault()
}
}} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export function DetailDrawer({ deploymentId, ...props }: Readonly<DrawerProps &
<Table<IDeploymentHistory>
loading={isLoading}
rowKey={record => record.mapperKey}
tableLayout="fixed"
scroll={{ x: 500 }}
columns={[
{
title: "Mapping use case",
Expand All @@ -55,7 +57,7 @@ export function DetailDrawer({ deploymentId, ...props }: Readonly<DrawerProps &
},
{
title: "Upgrade status",
width: 180,
width: 140,
dataIndex: "status",
render: (status: string) => <DeploymentStatus status={status} />,
},
Expand Down

0 comments on commit d761d3a

Please sign in to comment.