We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I click the show more the additional text doesn't show. It seems to reload the page
The text was updated successfully, but these errors were encountered:
You can't.
But you can hack your way. When you click, you change the line to a ridiculous number.
const [line, setLine] = useState(2); <TextTruncate line={line} element="span" truncateText="…" text={ user.description } textTruncateChild={<button onClick={()=>{ setLine(9999999999) }}>I want mooooore</button>} />
Or you just hide the real text and when you click, you show the real one and hide the truncated one.
const [showText, setShowText] = useState(false); {showText ? ( <> {user.description} </> ) : ( <TextTruncate line={2} element="span" truncateText="…" text={user.description} textTruncateChild={<button onClick={() => { setShowText(true) }}>I want mooooore</button>} /> )}
Sorry, something went wrong.
No branches or pull requests
When I click the show more the additional text doesn't show. It seems to reload the page
The text was updated successfully, but these errors were encountered: