office-fabric

How we can close the error messagebar of office react fabric component?

孤街醉人 提交于 2019-12-23 17:24:09
问题 I am trying to use fabric react messageBar component in my application but i am not able to close(dismiss) the message section even i clicked on close icon in the messageBar component. Please find the below code for reference. import React from 'react' import { MessageBar, MessageBarType } from 'office-ui-fabric-react/lib-commonjs/MessageBar' class MyMessage extends React.Component{ log=(event)=>{ console.log('close on test'); } render(){ return( <div> <MessageBar componentRef={(messageBar)=>

React Fabric UI Pivot unmounts component on PivotItem change

扶醉桌前 提交于 2019-12-11 19:14:40
问题 I'm using a Pivot component from FabricUI but I'm stuck because I have several PivotItems and every PivotItem has a child component that talks to the server when it's mounted. Every time I change a pivot item, current component get's unmounted and a new one is mounted. <Pivot> <PivotItem linkText='One' itemKey='0'> <GridDataOne/> </PivotItem> <PivotItem linkText='Two' itemKey='1'> <GridDataTwo/> </PivotItem> </Pivot> class GridDataTwo extends React.Component<any,any> { ... componentDidMount()

How do you style a office fabric react component?

我的未来我决定 提交于 2019-12-11 07:37:01
问题 I can't figure out how to style the fabric ui component. I just want to change the background of the nav bar to be black with white phone instead of white background and black font. However, this seems to be really difficult with the current component. There is virtually no documenation on how to style either. https://dev.office.com/fabric#/components/nav Thanks, Derek 回答1: css inline not working? Example: style={{backgroundColor:'black', color:'white'}} Regards. 来源: https://stackoverflow.com

Remove Click handler from fabric dialog overlay

一曲冷凌霜 提交于 2019-12-08 08:57:45
问题 I'm using Office-Fabric-Ui and its dialog functionality. var template = $("<div id='something'>This is modal dialog content</div>"); var uidialog = new fabric["Dialog"](template[0]); Now, uidialog has _overlay variable, on click of this _overlay the uidialog closes, but we don't want the dialog to close on click and trying to remove the handlers on _overlay I have tried many solutions some of them are but still unable to remove the handlers from overlay element: Solution 1 fabric.Dialog