Sfoglia il codice sorgente

fix: add overflow ellipsis in FieldCellButton

Alexandre Moreau 2 anni fa
parent
commit
0e278ddf3f

+ 6 - 4
frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell.dart

@@ -167,10 +167,12 @@ class FieldCellButton extends StatelessWidget {
       onTap: onTap,
       onTap: onTap,
       leftIcon: svgWidget(field.fieldType.iconName(), color: theme.iconColor),
       leftIcon: svgWidget(field.fieldType.iconName(), color: theme.iconColor),
       text: FlowyText.medium(
       text: FlowyText.medium(
-        field.name,
-        fontSize: 12,
-        maxLines: maxLines,
-      ),
+          Characters(field.name)
+              .replaceAll(Characters(''), Characters('\u{200B}'))
+              .toString(),
+          fontSize: 12,
+          maxLines: maxLines,
+          overflow: TextOverflow.ellipsis),
       margin: GridSize.cellContentInsets,
       margin: GridSize.cellContentInsets,
     );
     );
   }
   }