Coder Social home page Coder Social logo

rtable's People

Contributors

kos avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rtable's Issues

URL param prefixing

Currently there can reasonably be only one RTable on a page, and it completely dominates the URL's query string.

In order to have several of these on one page, one of the following needs to happen:

a. they no longer read from or update window.location. The table state might be retained somewhere else in this case (like the session storage).
b. they still work with window.location, but each has a separate prefix. The page URL contains parameters for each table on the page.

Both approaches could be implemented as opt-in.

Multi-column ordering

Currently the ordering works on only one column at the time. Why?

Clicking on several headers in sequence should remember the state of previous headers clicked, giving the functional equivalent of stable sorting.

Theming: Allow to control the markup

I want to be able to define:

  • how does each row look like?
  • how the pagination and filter elements look like?
  • how is the whole RTable pieced together?

The idea I have is to break down RTable.render() so that it doesn't produce any HTML on its own, but rather delegates pieces of its own state to sub-components that can be replaced individually.

The default sub-components should also offer some more flexibility, esp. the class names used, so that it's easy to make it "look like bootstrap" or "look like semantic ui" without actually redefining the react components.

Cursor-based pagination

The code assumes a lot about page numbers - that they are integers and the initial page is 1.

When possible, the page number should be treated as an opaque identifier, so that you can paginate using cursors as well as page numbers. Page numbers shouldn't be generally produced by RTable, only taken from incoming DataResponses.

However, we'd still want to allow extra features that base on numerical pages, like "showing page 5 of 123" or "go to page 5". This might mean that RTable would have a separate mode for numerical and opaque page identifiers. Or we could just look at DataResponse and decide what to show (as in, if we have count and the page identifier is numeric, then assume sequential pages)

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.