How to use the @uifabric/example-app-base/lib/utilities/data.createListItems function in @uifabric/example-app-base

To help you get started, we’ve selected a few @uifabric/example-app-base examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OfficeDev / office-ui-fabric-react / packages / experiments / src / components / Shimmer / examples / Shimmer.Application.Example.tsx View on Github external
function _buildColumns(): IColumn[] {
  const _item = createListItems(1);
  const columns: IColumn[] = buildColumns(_item);

  columns.forEach((column: IColumn) => {
    if (column.key === 'thumbnail') {
      column.name = 'FileType';
      column.minWidth = 16;
      column.maxWidth = 16;
      column.isIconOnly = true;
      column.iconName = 'Page';
    }
  });
  return columns;
}
github OfficeDev / office-ui-fabric-react / packages / experiments / src / components / Shimmer / examples / Shimmer.Application.Example.tsx View on Github external
private _onLoadData = (event: React.MouseEvent, checked: boolean): void => {
    if (!_items) {
      _items = createListItems(ITEMS_COUNT);
      _items.map((item: IItem) => {
        const randomFileType = this._randomFileIcon();
        item.thumbnail = randomFileType.url;
      });
    }

    let items: IItem[];
    if (checked) {
      items = _items.slice(0, ITEMS_BATCH_SIZE).concat(new Array(ITEMS_COUNT - ITEMS_BATCH_SIZE));
    } else {
      items = new Array();
      this._async.clearTimeout(this._lastTimeoutId);
    }
    this.setState({
      isDataLoaded: checked,
      items: items