You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am stuck as to lastRowFixedOnly requires a javascript to be run in order to make it work. Where should I write it? While defining the Component ToolBar, I wrote it in componentDidMount method but it gives me an error of mdc is not defined.
importReactfrom"react";importToolbarfrom"react-mdc-web/lib/Toolbar/Toolbar";importToolbarRowfrom"react-mdc-web/lib/Toolbar/ToolbarRow";importToolbarSectionfrom"react-mdc-web/lib/Toolbar/ToolbarSection";importToolbarTitlefrom"react-mdc-web/lib/Toolbar/ToolbarTitle";exportclassHeaderextendsReact.Component{componentDidMount(){consts=document.createElement("script");s.type="text/javascript";s.async=true;s.innerHTML="var toolbar = mdc.toolbar.MDCToolbar.attachTo(document.querySelector('.mdc-toolbar')); toolbar.fixedAdjustElement = document.querySelector('.mdc-toolbar-fixed-adjust');";document.body.appendChild(s);}render(){return(<ToolbarfixedfixedLastRowOnly><ToolbarRow><ToolbarSection><h1>This is row 1</h1></ToolbarSection></ToolbarRow><ToolbarRow><ToolbarSection><ToolbarTitle>Title</ToolbarTitle></ToolbarSection></ToolbarRow><ToolbarRow><ToolbarSection><ToolbarTitle>Title</ToolbarTitle></ToolbarSection></ToolbarRow></Toolbar>);}}
The text was updated successfully, but these errors were encountered:
I am stuck as to lastRowFixedOnly requires a javascript to be run in order to make it work. Where should I write it? While defining the Component ToolBar, I wrote it in componentDidMount method but it gives me an error of mdc is not defined.
The text was updated successfully, but these errors were encountered: