UNPKG

cluedin-widget

Version:

This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.

31 lines (23 loc) 618 B
import React from 'react'; export default class WidgetWithPlaceWidgetComponent extends React.Component { constructor() { super(); } placeWidget( name ) { var children = this.props.widgets; if ( !children ) { return; } if ( !name ) { return children.filter( ( c )=> { return (c && !c.place); } ); } return children.filter( ( c )=> { if ( !c.place && name === "Content" ) { return true; } return c && c.place === name; } ); } }