Issue with renderCustomContent
See original GitHub issueHello,
Thank you for creating this package, it is very helpful! Unfortunately I wasn’t able to get renderCustomContent to work and I found that I had to change line 228 in FlashMessage.js to
{!!message.renderCustomContent && message.renderCustomContent()}
in order for it to work. Maybe this is something that you could look into? Thank you so much! 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Developers - renderCustomContent doesn't work - - Bountysource
renderCustomContent parameter doesn't work. showMessage({ message: "Simple message", type: "info", renderCustomContent: ()=> <Text>Test ...
Read more >How to render custom content blocks? [#2960149] | Drupal.org
So I guess it is not an issue with my theme's custom template suggestions. Is there a way to pass the custom content...
Read more >Scheduler does not render custom content in the "All Day" cells
Hi, I'm using the scheduler with AngularJS and you can see on this codepen my problem : https://codepen.io/anon/pen/gvRQNR In Chrome it ...
Read more >Render custom content in sheet cell (PrimeFaces Extensions)
This issue has been raised before and its not so simple with the HandsonTable. Its doable just not simple.
Read more >New-UDTableColumn Render Parameter Issues - PowerShell ...
Use this parameter instead of property to render custom content within a column. The $Body variable will contain the current row being rendered....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @imouto2005
Now I get it.
renderCustomContent
was a contribution from other user to this lib, but I think it’s easy to solve your problem.I main
render
method you could change this:In this:
The
this.prop
method are made just to deal with when the props comes frommessage
or come from the instance 😉Could you try over there and tell if it works?
I can confirm it works as expected!
Personally I think this approach is more flexible than having it as part of FlashMessage component. Indeed passing the renderCustomContent as another message option makes it more customisable because allows to tailor the JSX to be rendered from anywhere when it’s used to display messages globally.
@lucasferreira are you planning to release it any time soon?
BTW awesome work! Thanks!
Cheers,
Federico