Skip to content

Support for textSuffix and forceEvaluate flags - #64

Open
vigneshk-fd wants to merge 5 commits into
semanticpixel:masterfrom
vigneshk-fd:fs-line-clamp
Open

vigneshk-fd wants to merge 5 commits into
semanticpixel:masterfrom
vigneshk-fd:fs-line-clamp

Conversation

@vigneshk-fd

Copy link
Copy Markdown

Thanks for the wonderful add-on.

I would like to add two new flags to the add-on for enhanced usability.

Example scenario : A simple table that list products, where the line clamp component is used in the name column. The name columns needs to display the product id, along with the name text. Also the name column is resizable, so that ellipsis has to be recomputed based on the new width.

  1. textSuffix --> Suffix text that can be appended after the ellipsis (before See More/See Less link)

Example :
textSuffix : "#ID-001"
Rendered as : "helloWorld helloWorld ... #ID-001 See More"

  1. forceEvaluate --> Boolean flag that the parent components can pass to re-evaluate the clamping logic.

Example :
forceEvaluate : false (parent container width: 300px)
Rendered as : "helloWorld helloWorld ... See More"

forceEvaluate : true (parent container width: 100px)
Rendered as : "helloWorld ... See More"

Added test cases for each flag as well.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant