ejbenke/SPFx-React-Accordion-Section

Great sample!

hugoabernier opened this issue · 2 comments

@ejbenke this is a great sample. I've been looking for a good accordion SPFx sample.

Would you be interested in posting your sample on the aka.ms/spfx-webparts samples repository?

If you're interested, you can let me know via GitHub or @bernierh on Twitter and we can make it happen!

Thanks for sharing your awesome work!

Also, have you considered changing line 77 of your ReactAccordion.tsx from:

<p>{item.Content}</p>

To

<p  dangerouslySetInnerHTML={{__html: item.Content}} />

...or a similar approach to allow rich formatting in your collapsible sections ?

I'm asking because a community member found your sample and referred me to it, but wanted to add rich formatting.

Hi @hugoabernier - thanks for the positive feedback! I'd be glad to have this added to the SPFx samples repository. That collection of samples is a great resource that I've referenced quite frequently myself.

And really appreciate the suggestion on allowing for rich text. Recently had an issue placed for that in this repo & also some direct requests for such an enhancement from members of my local SharePoint users group who implemented the web part in their tenants. I've been testing a couple different approaches to achieve that but yours is simpler than what I'd been looking at so I'll likely commit that change very soon.