Giter Site home page Giter Site logo

knockout-table's People

Contributors

lb- avatar mbest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

knockout-table's Issues

support templates of some sort

...for both headings and data items. This addition shouldn't slow down the binding or make it difficult to use.

Ideas:

  1. Allow the header and data functions to return html instead of text. Those functions can then be used for basic templating. If the user accesses an observable in the function, they can wrap the whole thing in a computed observable and return that.
  2. Support an inline or named template that follows a specific format. This would use the Knockout templating system only to read the template. The rendering would be handled directly by the table binding (for speed).
  3. Use sub-classing to support templating. The user would create a new binding based on table that would implement functions for generating the header and data values.

How does this compare to knockout-repeat in terms of performance and usability?

I'm working on an enhanced grid (similar to https://github.com/Knockout-Contrib/KoGrid) that may require several thousand rows to be rendered. The grid has many features like inline-editing, column resizing, row-level actions, etc. Initially I began with nested foreach looks to generate the rows/columns knowing it would eventually become a bottleneck.

I'm at the point where I would like to improve this approach. I've thought about rendering the grid in memory much like this plugin does but I'm worried about the level of control I can get on the individual nodes and bindings.

My research brought me to your 2 plugins, knockout-table and knockout-repeat. I've looked at the source of each and I understand their differences. My main question however is how do they compare to each other in terms of performance and usability?

The knockout-table should be faster in theory but is it worth the maintenance cost?

changes to options

rows and data changes:

data can either be a function (similar to now) or an array or object that stores the data. If it's a function, the first parameter is the row index instead of the row array or object (that it is now). If it's an array or object, it's used just like rows is used now. data is required.

rows can be either a number or an array of strings used as indexes of the rows (just like the columns option). rows is optional ifdata` is an array.

columns changes:

columns can be optional if data is an array of arrays. In that case, the number of columns will be the length of the longest row array in data.

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.