griddle with results属性不起作用

时间:2017-08-03 07:06:09

标签: reactjs griddle

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} />

使用数据ATTRIBUTE表即将到来,但分页不起作用。

1 个答案:

答案 0 :(得分:0)

...没关系

我忘了添加

plugins={[plugins.LocalPlugin]}

属性

<Griddle data={fakeData} plugins={[plugins.LocalPlugin]}
  />