From 7643bab89df05e3ce4cbfa593d89596f38f8fc45 Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Wed, 18 Dec 2024 19:20:27 +0530 Subject: [PATCH] add minwidth to editable text --- packages/app/modules/pack/components/PackTable/ItemCard.tsx | 4 ++++ packages/app/modules/pack/components/PackTable/ItemList.tsx | 2 ++ packages/ui/src/EditableText/EditableText.tsx | 1 + 3 files changed, 7 insertions(+) diff --git a/packages/app/modules/pack/components/PackTable/ItemCard.tsx b/packages/app/modules/pack/components/PackTable/ItemCard.tsx index 3604bd595..107a3a2bd 100644 --- a/packages/app/modules/pack/components/PackTable/ItemCard.tsx +++ b/packages/app/modules/pack/components/PackTable/ItemCard.tsx @@ -52,7 +52,11 @@ export const ItemCard = ({ fontWeight: 'bold', fontSize: 16, color: currentTheme.colors.text, + flex: 1, + marginRight: 10, }} + numberOfLines={1} + ellipsizeMode="tail" > {item.name} diff --git a/packages/app/modules/pack/components/PackTable/ItemList.tsx b/packages/app/modules/pack/components/PackTable/ItemList.tsx index 37c99bdf3..58edb1c30 100644 --- a/packages/app/modules/pack/components/PackTable/ItemList.tsx +++ b/packages/app/modules/pack/components/PackTable/ItemList.tsx @@ -46,6 +46,8 @@ export const ItemList = ({ fontWeight: 'bold', flexBasis: '25%', }} + numberOfLines={1} + ellipsizeMode="tail" > {item.name} diff --git a/packages/ui/src/EditableText/EditableText.tsx b/packages/ui/src/EditableText/EditableText.tsx index 4020d79a1..89ac3f453 100644 --- a/packages/ui/src/EditableText/EditableText.tsx +++ b/packages/ui/src/EditableText/EditableText.tsx @@ -39,6 +39,7 @@ export const EditableText = ({ fontWeight: 'bold', color: '#0284c7', pointerEvents: 'auto', + minWidth: 20, }} ref={inputRef} onChange={handleChange}