Comments (3)
Hi Anneka, this could be possible using a ref and poking around the DOM directly on a lifecycle hook in your component (maybe componentDidMount). I'm not exactly sure how that'd go without trying it myself. I'll keep this open and try it out when I have a sec to see if I can whip up an example.
from shiitake.
Hi @AnnekaSillitoe I've got a release that allows you to pass a function to be called when the text is truncated or not: https://github.com/bsidelinger912/shiitake/releases/tag/v2.3.0.
from shiitake.
Closing as this feature exists and was published a while ago.
from shiitake.
Related Issues (20)
- Support React 16 HOT 2
- Cannot read property 'length' of null HOT 4
- Will you support crossbrowser? HOT 1
- No aria-hidden tags on unseen elements
- ResizeListener rerenders despite same props HOT 4
- How to know if the text is truncated ? HOT 3
- add custom params HOT 2
- Add resize ref HOT 3
- alt-codes/emoticons/emojis and after are removed HOT 1
- Remove 'componentWillReceiveProps' for React 17 HOT 6
- Can be "a" in the tag whitelist? HOT 3
- classes for span... HOT 2
- Shiitake doesn't play well with lazy/Suspense HOT 5
- [3.0] Typescript: attributes property should be optional HOT 1
- Updating UI state does not result in a change of value rendered HOT 2
- Ref issues with jest snapshot testing HOT 2
- Unable to remove styling from inner span
- Guidance on use with React 17.0.0
- Does the repo support HTML content type?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shiitake.