Skip to content

Commit

Permalink
Refactor enum description field layout in AddCustomProperty and EditC…
Browse files Browse the repository at this point in the history
…ustomPropertyModal
  • Loading branch information
Sachin-chaurasiya committed Sep 19, 2024
1 parent 4774a3c commit faedc98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ const AddCustomProperty = () => {

{fields.map((field, index) => (
<Row gutter={[8, 0]} key={field.key}>
<Col span={22}>
<Col span={23}>
<Row gutter={[8, 0]}>
<Col span={24}>
<Form.Item
Expand Down Expand Up @@ -469,6 +469,12 @@ const AddCustomProperty = () => {
rules={[
{
required: true,
message: `${t(
'message.field-text-is-required',
{
fieldText: t('label.description'),
}
)}`,
},
]}
trigger="onTextChange"
Expand All @@ -478,8 +484,9 @@ const AddCustomProperty = () => {
</Col>
</Row>
</Col>
<Col span={2}>
<Col span={1}>
<Button
data-testid={`remove-enum-description-config-${index}`}
icon={<DeleteIcon width={16} />}
size="small"
type="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ const EditCustomPropertyModal: FC<EditCustomPropertyModalProps> = ({
rules={[
{
required: true,
message: `${t(
'message.field-text-is-required',
{
fieldText: t('label.description'),
}
)}`,
},
]}
trigger="onTextChange"
Expand All @@ -335,6 +341,7 @@ const EditCustomPropertyModal: FC<EditCustomPropertyModalProps> = ({
{!isExisting && (
<Col span={1}>
<Button
data-testid={`remove-enum-description-config-${index}`}
icon={<DeleteIcon width={16} />}
size="small"
type="text"
Expand Down

0 comments on commit faedc98

Please sign in to comment.