Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "core/CvRecordList"

Index

Variables

CvRecordList

CvRecordList: ClassicComponentClass<CvRecordListProps> = React.createClass<CvRecordListProps, CvRecordListState>({mixins: [CvBaseMixin],getChildContext: function () {const ctx = this.getDefaultChildContext();ctx.cvContext.scopeCtx.scopeObj = this.queryContext();return ctx;},getDefaultProps: function() {return {wrapperElemName: 'span', rowRenderer: null, queryContext: null, wrapperElemProps: {}}},queryContext: function(nextProps) {return (nextProps && nextProps.queryContext) || this.props.queryContext || this.firstInScope(QueryContext);},render: function () {const queryContext = this.queryContext();if(queryContext && !queryContext.isDestroyed) {if(this.props.renderer) {return this.props.renderer(this.getChildContext().cvContext);} else if (this.props.rowRenderer) {const entityRecs:Array<EntityRec> = ArrayUtil.copy<EntityRec>(queryContext.scroller.buffer);let newChildren = [];entityRecs.forEach((entityRec:EntityRec)=> {const row = this.props.rowRenderer(this.getChildContext().cvContext, entityRec);if(row) {const newElement = React.cloneElement(row, {key: entityRec.objectId});newChildren.push(newElement);}});return React.createElement(this.props.wrapperElemName, this.props.wrapperElemProps, newChildren);} else {return null;}} else {return null;}},})

Generated using TypeDoc