0

https://griddlegriddle.github.io/v0-docs/quickstart.html

我只是按照上面的例子

import React from 'react';

import Griddle, { RowDefinition, ColumnDefinition } from 'griddle-react';

var fakeData =  [
  {
      "id": 0,
      "age": 23,
      "name": "Reyna Pate",
      "company": "LOTRON",
      "state": "Connecticut",
      "country": "Egypt",
      "favoriteNumber": 0
    },
    {
      "id": 1,
      "age": 20,
      "name": "Lidia Cabrera",
      "company": "GORGANIC",
      "state": "Illinois",
      "country": "Cocos (Keeling Islands)",
      "favoriteNumber": 1
    },
    {
      "id": 2,
      "age": 28,
      "name": "Alana Bonner",
      "company": "ELENTRIX",
      "state": "Florida",
      "country": "Latvia",
      "favoriteNumber": 2
    }];

在渲染函数返回

<Griddle results={fakeData} resultsPerPage={2} />

显示“未找到结果”。文本。

<Griddle data={fakeData} resultsPerPage={2} />

在使用数据属性表时,但分页不起作用。

4

1 回答 1

0

没关系...

我忘了添加

plugins={[plugins.LocalPlugin]}

属性

<Griddle data={fakeData} plugins={[plugins.LocalPlugin]}
  />
于 2017-08-03T07:30:18.003 回答