React-dotdotdot icon indicating copy to clipboard operation
React-dotdotdot copied to clipboard

Multiline text ellipsis for react. Demo:

Results 16 React-dotdotdot issues
Sort by recently updated
recently updated
newest added

I guess this is somewhat complicated given that children can not only be strings but also html but a nice feature to have would be to have a tooltip on...

I am passing the number of lines to clamp which is stateful. Clamp does not rerender when the state changes ``` const [ lines, setLines ] = useState(3); return (...

Hello Mr CezaryDanielNowak, I have tried to use your Dotdotdot component like this ``` hello everyonFRRRRRRRRRRRRRRRReveryonFRRRRRRRRRRRRRRRReveryonFRRRRRRRRRRRRRRRReveryonFRRRRRRRRRRRRRRRReveryonFRRRRRRRRRRRRRRRReveryonFRRRRRRRRRRRRRRRReveryonFRRRRRRRRRRRRRRRR ``` **And I got:** ![Capture d’écran 2021-02-17 à 21 58 23](https://user-images.githubusercontent.com/67704982/108268494-e1955900-716c-11eb-83c9-317af49de109.png) So, I did...

https://github.com/CezaryDanielNowak/React-dotdotdot/blob/master/src/index.js#L70 ``` Dotdotdot.propTypes = { children: PropTypes.node, clamp: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.bool ]).isRequired, truncationChar: PropTypes.string, useNativeClamp: PropTypes.bool, className: PropTypes.string, tagName: PropTypes.string }; ``` https://github.com/CezaryDanielNowak/React-dotdotdot/blob/master/src/index.d.ts#L3 ``` export interface DotdotdotProps extends React.HTMLProps...

When I set `truncationChar=" "`, the first line of my text is rendered with all spaces missing. **My setup:** ``` {article.description} ``` **Result:** Using `truncationHTML` _without_ `truncationChar` set leads to...

This PR fixes an issue where the content will reclamp on container shrink (window resize), but it will not re-expand on container grow. This is because the content is imperatively...

The documentation states that `useNativeClamp` defaults to `true` but I believe this was changed in version 1.3.0 (based on the changelogs). I think the correct fix here would be to...

I wonder if this is a some sort of design choice, but it seems that the element doesn't recalculate the correct text amount when the available space increases. It can...

precondition: useNativeClamp = false ; it clamp the container content with ..., when window is small steps: enlarge the window , thus the container become large, but the it still...

Miscalculates where to truncate (often truncating the entire text) in Firefox if using `white-space: pre-wrap` to display multiline text. Works fine on Chrome. Repro: Style: ``` .formatted-text { white-space: pre-wrap;...