SPFX Fabric 2.34.2 : Callout control, not rendering dynamic content
Bug Report
- Package version(s): 2.34.2
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? (Yes, No)
Requested priority: (Normal)
Products/sites affected: Office 365/SharePoint online
Describe the issue:
Using a Callout control from fabric with array content. I expect the callout to display the dynamic content. Instead only compile time/Static content is displayed. If you reference the array items individually then it does work.
Actual behavior:
Only static/compile time content is returned.
Expected behavior:
Normal react behaviour when rendering an array.
Use a Callout in a tsx and mix both static and dynamic content
In the below snippet, the content of words (except the div) is never displayed.
If I use Words as part of my control (render) it works fine.
The rest of wordMuncher will be displayed fine.
var words = <div className="divIsShown">{_(this.state.foundWords).map(itm => {
return <div key={itm.Id}>
<CompoundButton id={itm.Id} disabled={false}>
{itm.Value}
</CompoundButton>
</div>
})}</div>
var wordMuncher = <div className="ms-Callout-inner">
<div className="ms-Callout-content">
<ul>
<li><h1>Static</h1></li>
<li>{words}</li>
</ul>
</div>
</div>
return wordMuncher;
I'm not really sure what this issue is about. It seems that it's talking about the Callout react component in fabric-react, but the sample doesn't show usage of <Callout ... />.
@pljfdi Can you clarify? I see the classNames reference callouts, are you using the legacy Fabric component styling? Or Fabric React components?
Sorry, I very aware I'm terrible at filing reports. (Details? Who needs'em? Oh, everyone.) I'm using Fabric react, with the SharePoint SPFX webpart framework.
And doesn't; matter how I apply it to the control, the result is the same so:
<Callout>
{wordMuncher}
</Callout>
The contents/styles of the WordMuncher variable are their just as a guide to show static content mixed with the array output.
incidentally, I can append the contents of words via the Callout props.children, from the componentRef, but just not gonna fly longterm.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React!
Hi @pljfdi, is this still an issue?
closing due to staleness.