Giter VIP home page Giter VIP logo

Comments (4)

1rosehip avatar 1rosehip commented on September 25, 2024

Hi,
Thank you for the feedback, I'm glad that the plugin is useful for you.

  1. I've uploaded the lib to npm, it's accessible here: https://www.npmjs.com/package/jplist-es6
  2. There is an ES6 jplist version here: https://github.com/1rosehip/jplist-es6/blob/master/dist/1.2.0/jplist-es6.min.js
    Also it's possible to import index.js or jplist.js as entry point in your source files depending on your needs.

from jplist-es6.

12evgen avatar 12evgen commented on September 25, 2024

Hi! thanks for the help! I connected the plugin as a module. Is it possible to call Jplist through the constructor (as indicated in the picture)?

jplist

The following error in the console

jplist-3

from jplist-es6.

1rosehip avatar 1rosehip commented on September 25, 2024

There is some required code that should be added before jplist initialization, you may find it in index.js. jPList requires window.jplist.controlTypes that actually just a ES6 Map of controls that you need in your app. In the index.js file above there is a full list of controls, but you may include only controls that you need.

Also index.js contains custom events polyfill for IE 10/11, without it jPList won't work in these browsers.

And the last important thing is binding to jPList APIs:

window.jplist.init = jplist.init.bind(jplist);
window.jplist.refresh = jplist.refresh.bind(jplist);
window.jplist.resetControls = jplist.resetControls.bind(jplist);
window.jplist.resetControl = jplist.resetControl.bind(jplist);

from jplist-es6.

amrography avatar amrography commented on September 25, 2024

@12evgen
try import "jplist-es6/dist/1.2.0/jplist-es6.min.js";

from jplist-es6.

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.