Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numbers don't go to the next line, instead they overlap with others if numbers exceed the width of the parent tag width. #2852

Open
AmmarAhmed1448 opened this issue Aug 26, 2024 · 0 comments

Comments

@AmmarAhmed1448
Copy link

AmmarAhmed1448 commented Aug 26, 2024

Describe the bug
A clear and concise description of what the bug is.
If there are Numbers in the Text tag, they overlap with the adjacent text when they exceed the Width of the View. But if there is non-numeric data, the text gets hyphenated.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a document with a page in it
  2. Create a row inside in which there is numeric and non-numeric data
  3. For eg:

                {/* Table */}
                <View style={[styles.borderbottomblack, styles.flex, {alignItems: "flex-end"}]}>

                    <View style={{ width: "35%" }}>

    
                        <View style={[styles.flex]}>
                            <View style={{ width: "20%" }}>
                                <Text style={[styles.text7]}>0316202487894892748</Text>
                            </View>
                            <View style={[styles.bgGreen,{ width: "20%" }]}>
                                <Text style={[styles.text7]}>OT103ST829479374892</Text>
                            </View>
                            <View style={{ width: "60%" }}>
                                <Text style={[styles.text7]}>Men 100% COTTON 
                                DENIM PANT Men 100% COTTON 
                                DENIM PANT</Text>
                            </View>
                        </View>
                    </View>

                    <View style={{ width: "5%", paddingHorizontal: 5 }}>
                        <Text style={[styles.text7]}>26-44/34</Text>
                    </View>

                    <View style={{ width: "5%", paddingHorizontal: 5 }}>
                        <Text style={[styles.text7]}>4.45345</Text>
                    </View>
                    <View style={{ width: "10%", paddingHorizontal: 5 }}>
                        <Text style={[styles.text7]}>4312iy8428y492y482</Text>
                    </View>
                    <View style={{ width: "10%", paddingHorizontal: 5 }}>
                        <Text style={[styles.text7]}>85293847982478924</Text>
                    </View>
                    <View style={{ width: "5%", paddingHorizontal: 5 }}>
                        <Text style={[styles.text7]}>274892347242947828</Text>
                    </View>
                    <View style={{ width: "10%", paddingHorizontal: 5 }}>
                        <Text style={[styles.text7]}>73895739758347583</Text>
                    </View>
                    <View style={{ width: "10%", paddingHorizontal: 5 }}>
                        <Text style={[styles.text7]}>892374823749728</Text>
                    </View>
                    <View style={{ width: "10%", paddingHorizontal: 5 }}>
                        <Text style={[styles.text7]}>2789423748924728</Text>
                    </View>
                </View>



Expected behaviour
if the number exceeds the width of the View, it should go to the next line without hyphenation.

Screenshots
image

If there is text, then hyphenation works, but in the case of numbers, the text overlaps

@AmmarAhmed1448 AmmarAhmed1448 changed the title Numbers don't go to the next line, instead they overlap with other numbers if numbers exceed the width Numbers don't go to the next line, instead they overlap with others if numbers exceed the width of the parent tag width. Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@AmmarAhmed1448 and others