Search code examples
reactjsgriddle

griddle with results attribute is not working


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

I am just following above example

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
    }];

in render function returning

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

displays "No results found." text.

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

while using data ATTRIBUTE table is coming but pagination is not working.


Solution

  • nevermind...

    I forgot to add

    plugins={[plugins.LocalPlugin]}
    

    attribute

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