react-truncate-html
react-truncate-html copied to clipboard
Changing Lines does not change the component
Im using react-truncate-html with a slider on my page where a user can define the amount of lines. However the Truncate component seems to cache the data. As the data doesn't change, only the amount of lines it doesn't update to the new amount of lines.
Is it possible to take the change in properties into account?
Sure! Feel free to file a PR, this would probably be a good starting point: https://github.com/jariz/react-truncate-html/blob/master/Truncate.js#L47
The line I referenced changed, see this new link: https://github.com/jariz/react-truncate-html/blob/master/Truncate.js#L52