mbest / knockout-table Goto Github PK
View Code? Open in Web Editor NEWTable binding plugin for Knockout
Table binding plugin for Knockout
...for both headings and data items. This addition shouldn't slow down the binding or make it difficult to use.
Ideas:
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.table
binding (for speed).table
that would implement functions for generating the header and data values.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?
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 if
data` 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
.
Hi,
You plugin looks very impressive, I just came across it on knockout's forum.
I see that, given a data table, it will generate an html table.
However, do I have the ability to modify the data table and have the change reflected in the html table? Can I use some sort of filtered table? Can I manually trigger an update?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.