fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

ContextualMenu generating onLayerMounted unknown prop in <div>

Open pablonete opened this issue 10 years ago • 4 comments

I'm using FabricReact 0.52.3 with React 15.3.1.

Just rendering a ContextualMenu I get 2 warnings.

<ContextualMenu 
    targetElement={ this.refs["button"] as HTMLSpanElement }
    directionalHint={ DirectionalHint.bottomLeftEdge }
    onDismiss={ this.dismiss }
    items={[
    {
        key: "download",
        name: "download",
        icon: "download",
        onClick: this.foo,
    }
]} />

If we use onRender in items, the second warning goes away.

react.js:22814 Warning: Unknown prop `onLayerMounted` on <div> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in div (created by ProjectedLayer)
    in ProjectedLayer (created by LayerHost)
    in div (created by LayerHost)
    in div (created by Fabric)
    in Fabric (created by LayerHost)
    in div (created by LayerHost)
    in LayerHostprintWarning 
react.js:22814 Warning: Unknown prop `dataCommandKey` on <button> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in button (created by ContextualMenu)
    in li (created by ContextualMenu)
    in ul (created by ContextualMenu)
    in div (created by FocusZone)
    in FocusZone (created by ContextualMenu)
    in div (created by ContextualMenu)
    in div (created by Popup)
    in Popup (created by Callout)
    in div (created by Callout)
    in div (created by Callout)
    in div (created by ProjectedLayer)
    in ProjectedLayer (created by LayerHost)
    in div (created by LayerHost)
    in div (created by Fabric)
    in Fabric (created by LayerHost)
    in div (created by LayerHost)
    in LayerHost

pablonete avatar Sep 29 '16 09:09 pablonete

+1

yaananth avatar Oct 18 '16 20:10 yaananth

@pablonete @yaananth Hey,

It looks like this was fixed in this https://github.com/OfficeDev/office-ui-fabric-react/commit/9bd5bb66fb855306ce7eb9a981b50f3635b34cf9 commit. I believe that the fix should be in version .53 . Please let me know if that is not the case!

joschect avatar Oct 18 '16 20:10 joschect

I still see the layer one in there. I'll fix that.

dzearing avatar Oct 24 '16 19:10 dzearing

Will be resolved completely in the next publish > 0.61.0

dzearing avatar Oct 24 '16 19:10 dzearing