SharePoint Field Conntrols for usin in SPFX react component

Iron Contributor

Hi, 

I'm working on a smaple SPFX webpart that well let users edit some data in a sharepoint list. How can I reuse the controls used my Sharepoint Online. like the datepicker, the dropdown select, etc.

Thnaks

9 Replies

Did you ever find any answers on this? I'm namely looking for a peoplepicker control using the Office-UI-Fabric-React components but am not quite getting it to load anything. 

hi,,

the,only 'answer' i found is that they are thinking of open sourcing some of the code after they go live.  it's kind of ridiculous that you,me,  and everyone else, would need to implement their  own peoplepicker.

 

we should start a uservoice on this after spfx gets released.

russell

Are you specifically asking in the property pane or within the web part UX?

 

For property pane, we already have a series of controls in the road map. For web part UX, you can import the Fabric components and load your data based on your business logic in the web part. 

 

That said, please submit your suggestion to the SPFx uservoice as well.

 

Thanks,

Chaks

Hi Chaks,
I'm looking for controls to use in the webpart UX, I've been using the Office-ui-fabric-react controls.They work well for the most part. But it looks like the sharepoint team has enhanced some of them. For example the SharePoiint Date Picker has a time selector, Office Ui Fabric datepicker does not. I don't know what other controls have similar 'enhancements'-- maybe peoplepicker.

And then theirs the quickedit view. I ended up writing my own grid to let users edit items from multiple lists in a grid, It would be nice if I could reuse whatever grid control is used by quickedit.

Russell

And one other thing.... When we generate a react project from yeoman, the generated webpart ought to be using office-ui-fabric-react controls

Hi,
I think what we really need is some goidance on how to use the office-ui-fabric-react components in a way that is consistent with the way sharepoint uses them.

How do we add a time control to the date-picker?
How do we make a panel open when user selects an item in a Details list.
How do we add the ellipses to a DetailsList and make it open a context menu
How do we make a DetailsList display like the QuickEdit view(if thats what quickedit uses).
How do we populate a PeoplePicker from sharepoint.

I think a  document (or a webcast) on how the SharePoint team uses Office Ui Fabric would be awesome!

Thanks,
Russell

I agree @Russell Gove.  I was able to look at OlivierCC's PropertyField repository, and decipher what he's doing against the root webpart: OlivierCC's PeoplePicker Service but looking at leveraging the SPHttpClient of the Webpart root object in a component view of a React app project, is where I'm having some confusion, and guidence would be great. But that is also because this is the first time I'm using React too, and my Angular brain is probably trying to over-complicate it. :D 

 

Anyways, thanks. 

I would like to be able to re-use the people picker and taxonomy picker used in modern lists in my SPFx UI without having to code it myself. You already have field renderers for all SP types, and being able to re-use those would be great.

also  we should have access to the rich text editor.