GithubHelp home page GithubHelp logo

Comments (8)

afshinm avatar afshinm commented on June 5, 2024 4

@Naravyb it's definitely not a bug. html function was not imported correctly:

    new gridjs.Grid({
        columns: ['Pokemon', 'URL'],
        pagination: {
          limit: 5,
          server: {
            url: (prev, page, limit) => `${prev}?limit=${limit}&offset=${page * limit}`
          }
        },
        server: {
          url: 'https://pokeapi.co/api/v2/pokemon',
          then: data => data.results.map(pokemon => [
            pokemon.name, gridjs.html(`<a href='${pokemon.url}'>Link to ${pokemon.name}</a>`)
          ]),
          total: data => data.count
        } 
      }).render(document.getElementById("wrapper"));

https://jsfiddle.net/2041953p/

from gridjs.

afshinm avatar afshinm commented on June 5, 2024

@Naravyb how did you import html? Can you please create a jsFiddle/Codesandbox for me to debug?

from gridjs.

swiftalker avatar swiftalker commented on June 5, 2024

https://jsfiddle.net/nara014/ex1swno6/2/

like this problem that I found in gridJS, is this really a bug?

from gridjs.

swiftalker avatar swiftalker commented on June 5, 2024

I've found the solution by separating several components from the original grid.development.js file and this works perfectly. Powerful and nice.

https://gist.github.com/Naravyb/27c256f52d8321ec0b6d2d8cf71db179

from gridjs.

vkalidindiClopay avatar vkalidindiClopay commented on June 5, 2024

This doesn't work and I am getting the below issue

  1. [Grid.js] [ERROR]: Could not determine the storage type
  2. The above error occurred in the component: Consider adding an error boundary to your tree to customize error handling behavior.
    Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.

from gridjs.

Zonalds avatar Zonalds commented on June 5, 2024

Ran into this issue with react.
Here is how I imported the html;

import { Grid, html } from 'gridjs-react';

from gridjs.

chintanbanugaria avatar chintanbanugaria commented on June 5, 2024

@vkalidindiClopay

got the same issue of storage in vue with multiple instances. Did you resolved it ?

from gridjs.

joeskeen avatar joeskeen commented on June 5, 2024

For anyone trying the JSFiddle above in the future, I was able to get it to work by rewriting it using ES modules: https://jsfiddle.net/6aoqeLtw/

from gridjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.