🐛 (Text) single-line text (#967)

This commit is contained in:
Matiss Janis Aboltins
2023-04-29 17:26:34 +01:00
committed by GitHub
parent 71908b6fb9
commit db65e83722
3 changed files with 19 additions and 3 deletions

View File

@@ -37,9 +37,20 @@ export { default as View } from './common/View';
export { default as Text } from './common/Text';
export { default as Stack } from './Stack';
export function TextOneLine({ children, centered, ...props }) {
export function TextOneLine({ children, ...props }) {
return (
<Text numberOfLines={1} {...props}>
<Text
{...props}
style={[
props.style,
{
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
display: 'block',
},
]}
>
{children}
</Text>
);

View File

@@ -17,7 +17,6 @@ function CellValue({ binding, type, formatter, style, getStyle, debug }) {
style,
getStyle && getStyle(value),
]}
numberOfLines={1}
data-testid={name}
data-cellname={name}
>

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MatissJanis]
---
Re-introduce single line text blocks (useful for mobile)