office-ui-fabric

DetailsList header word split

瘦欲@ 提交于 2021-02-19 09:25:10
问题 Is it possible to split DetailsList column header caption into multiple lines? I want to make columns as narrow as possible as they only show icons, but column headers have 2 or 3 words. Thanks! 来源: https://stackoverflow.com/questions/52384693/detailslist-header-word-split

How to conditionally change a color of a row in detailslist?

不羁的心 提交于 2021-02-07 09:19:48
问题 I'm looking at customitemrows but there isn't much documentation. I have a table and if a row was created by a current user, I want to change the color from black to grey. I can do that with style . I understand how to conditionally change color in customitemcolumns but can't extrapolate it to rows. I got to: _onRenderRow = (props) => { return props.item['creatorUid'].match("QDN6k4pLXkea2qRM9mS7vM6whBE3")? <DetailsRow {...props} style={{color:"#FF0000"}}/> : <DetailsRow {...props}/> } but the

How to conditionally change a color of a row in detailslist?

限于喜欢 提交于 2021-02-07 09:17:01
问题 I'm looking at customitemrows but there isn't much documentation. I have a table and if a row was created by a current user, I want to change the color from black to grey. I can do that with style . I understand how to conditionally change color in customitemcolumns but can't extrapolate it to rows. I got to: _onRenderRow = (props) => { return props.item['creatorUid'].match("QDN6k4pLXkea2qRM9mS7vM6whBE3")? <DetailsRow {...props} style={{color:"#FF0000"}}/> : <DetailsRow {...props}/> } but the

Can I use Office UI Fabric React in a non-Microsoft internal application?

亡梦爱人 提交于 2021-02-07 04:05:35
问题 I was wondering if I can just use the Office React Fabric UI framework in a company internal application that is not related to Microsoft services such as SharePoint or Office. I read the License but didn't quite clear my question. https://github.com/OfficeDev/office-ui-fabric-react/blob/master/LICENSE 回答1: Yes! You can definitely use Fabric for these kinds of apps. However, according to the assets license linked to from that license doc, the assets (fonts and icons) can only be used if the

react: element.getBoundingClientRect is not a function

末鹿安然 提交于 2020-06-25 21:06:05
问题 i've got a component and want to use the Office-UI-Fabric-react component "Callout" when the mouse is hovering over a "Persona"-element. The "Callout" works if i reference the 'div' enclosing the "Persona"-element (using ref={this.setPersonaRef} ), but componentRef={this.setPersonaRef} in the "Persona"-element leads to Exception in CalloutContent.componentDidMount(): TypeError: element.getBoundingClientRect is not a function Here is the component: import * as React from 'react'; import * as

react: element.getBoundingClientRect is not a function

流过昼夜 提交于 2020-06-25 21:03:08
问题 i've got a component and want to use the Office-UI-Fabric-react component "Callout" when the mouse is hovering over a "Persona"-element. The "Callout" works if i reference the 'div' enclosing the "Persona"-element (using ref={this.setPersonaRef} ), but componentRef={this.setPersonaRef} in the "Persona"-element leads to Exception in CalloutContent.componentDidMount(): TypeError: element.getBoundingClientRect is not a function Here is the component: import * as React from 'react'; import * as

react: element.getBoundingClientRect is not a function

只谈情不闲聊 提交于 2020-06-25 21:02:05
问题 i've got a component and want to use the Office-UI-Fabric-react component "Callout" when the mouse is hovering over a "Persona"-element. The "Callout" works if i reference the 'div' enclosing the "Persona"-element (using ref={this.setPersonaRef} ), but componentRef={this.setPersonaRef} in the "Persona"-element leads to Exception in CalloutContent.componentDidMount(): TypeError: element.getBoundingClientRect is not a function Here is the component: import * as React from 'react'; import * as

Change theme like Fabric Web ( Default / Dark)

扶醉桌前 提交于 2020-05-28 06:07:06
问题 In the documentation page of fabric, now each example component have a change theme funcionality ie: example enter image description here How can I achive this funcionality. I have 2 themes (created in) and I want to switch betwen thems 回答1: Here is my preferred way, using React Context. import React from 'react'; import { Fabric, Customizer } from '@fluentui/react'; import { useLocalStorage } from 'react-use'; // Setup Theme Context and create hooks import { DefaultCustomizations,

How to toggle office-ui-fabric detailslist row selection using the entire row as a toggle instead of just using the small tiny checkbox

爷,独闯天下 提交于 2020-05-16 02:33:48
问题 I'm using Office UI Fabric React components and i'm trying to improve change the default selection behavior for a DetailsList. By default, there is a difference between clicking a row and clicking the tiny checkbox on the right. I want the same effects of the checkbox click to apply to the row click. When you click the checkbox it toggles the row and does not deselect other rows like when I use a row click. You can also use shift click and control click and all the other nice types of clicks