summaryrefslogtreecommitdiffstats
path: root/slick.dataview.js
Commit message (Collapse)AuthorAgeFilesLines
* Fix a typoMichael Leibman2013-12-031-1/+1
|
* Implement lazy totals calculation in the DataView.Michael Leibman2013-12-031-35/+55
| | | | | | | Add a ‘lazyTotalsCalculation’ grouping info option (default = false) that delays the totals calculation until the item is accessed via getItem(index). This can dramatically improve the perceived performance of the DataView operations on very large datasets.
* #794 - Add an event that exposes the internal selected row ids.Michael Leibman2013-11-171-4/+23
| | | | | Make DataView. syncGridSelection() return an event that notifies when an internal list of selected row ids changes.
* Fix #794 - Add an option to keep out-of-the-view items selected when ↵Michael Leibman2013-11-031-5/+29
| | | | selection changes (preserveHiddenOnSelectionChange)
* Fix #738 - Use an object instead of an array to hold groups by value.Michael Leibman2013-09-121-1/+1
|
* Merge pull request #587 from pandell/fix-inline-filtersMichael Leibman2013-07-111-8/+8
|\ | | | | Improve `return` matching for inlined filter functions
| * Fix inlining for evaluated return statements.John Gozde2013-04-231-4/+4
| | | | | | | | | | | | | | Applies the following regex changes: - Match closing brace and end-of-input as valid `return` terminators - Preserve captured return terminator in inlined function - Tolerate arbitrary spacing before return terminators
| * Fix return statement handling when inlining.John Gozde2013-04-231-4/+4
| | | | | | | | | | | | | | Modify regular expressions as follows: - Include end-of-input ($) as possible return statement terminator - Ignore spaces preceding return statement terminators - Preserve captured terminator in resulting function
* | Maintain the reference to the right "self" object in DataView.Michael Leibman2013-06-251-2/+2
|/
* Fix typosMichael Leibman2013-04-231-2/+2
|
* Add option to hide totals row.Sean Vieira2013-03-081-3/+4
| | | | | | | | | | | Allow groups to exclude the subtotals from the rendered grid. This is to allow using group formatters to display aggregate information in the group header rather than in a footer section (if desired). I'm sure there are other uses as well, I just haven't been able to think of any. Also added a new groupingInfoOption: * displayTotalsRow (defaults to true). We'll see if Github is smart enough to update the existing pull request.
* Optimize DataView flattenGroupedRows().Michael Leibman2013-03-071-3/+5
|
* Added support for predefined group values to DataView.Michael Leibman2013-03-011-5/+18
| | | | | | | New grouping info properties: - predefinedValues - An array containing the grouping values for which groups should be included even if they are empty. - aggregateEmpty - Whether aggreggators should be run on empty groups.
* Optimize up DataView aggregation.Michael Leibman2013-02-271-4/+6
|
* Add multi-level grouping to DataView.Michael Leibman2013-02-261-60/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the original pull request (https://github.com/mleibman/SlickGrid/pull/522) by ghiscoding. Deprecated DataVIew APIs (will continue to work): - .groupBy() - .setAggregators() New DataView APIs: - .getGrouping() - .setGrouping(groupingInfo) - .setGrouping([groupingInfo1, groupingInfo2, ...]) - .collapseAllGroups() - .collapseAllGroups(level) - .expandAllGroups() - .expandAllGroups(level) - .collapseGroup(groupingKey) - .collapseGroup(level1value, level2value, ...) - .expandGroup(groupingKey) - .expandGroup(level1value, level2value, ...) Grouping info options (for use in .setGrouping() calls): - getter - formatter - comparer - aggregators - aggregateCollapsed - aggregateChildGroups - collapsed New Group fields: - level - groups - groupingKey Also fixed 0-handling in default aggregators.
* Fix #498 - Selections are not always maintained when filtering (Example 4).Michael Leibman2012-12-181-15/+23
|
* Fix #299 - pager calculations.Michael Leibman2012-04-131-4/+5
|
* Do not compile filters if filter inlining is disabled (#289).Michael Leibman2012-02-151-2/+4
|
* Formatting fixup of a previous pull request merge.Michael Leibman2012-02-051-17/+18
|
* Update slick.dataview.jsghiscoding2012-02-051-6/+28
|
* Made DataView filter inlining optional (default is false).Michael Leibman2012-02-041-4/+36
|
* Made is dead simple to sync selection and cellCssStyles on DataView changes.Michael Leibman2012-01-271-0/+89
| | | | | | | | | | | | | DataView: - New "mapIdsToRows" and "mapRowsToIds" helper methods. - "syncGridSelection" and "syncGridCellCssStyles" keep selection and cell CSS styles (set via grid.setCellCssStyles) in sync across DataView changes. Use them if you want or write your version that incorporates your requirements. SlickGrid: - Added an "onCellCssStylesChanged" event and a "getCellCssStyles" accessor.
* Fixed issue 244 - Made filter function inliner work better with minified code.Michael Leibman2012-01-181-6/+6
|
* Fixed issue 197 - Bounds checking on pageSize change.Michael Leibman2012-01-181-0/+1
|
* Fixed DataView filtering on pageSize change when "isFilterUnchange" hint is ↵Michael Leibman2012-01-171-2/+2
| | | | specified
* More cleanup.Michael Leibman2012-01-171-53/+51
|
* Reformatted code.Michael Leibman2012-01-171-662/+687
|
* Fixed dataview filtering breaking, after compressing JS with e.g. Google ↵asavoy2011-12-071-28/+32
| | | | | | Closure Compiler compileFilter(): Rewrote function templates to survive JS compression whilst preserving original behavior
* Fixed a performance regression in DataView compiled filter and added ↵mleibman2011-11-111-6/+11
| | | | function names for easier profiling (only works in webkit; don't know of any other supported variants).
* Fixed issue 229.Michael Leibman2011-11-071-4/+12
| | | | | | - Updated filter loop compiler to handle loops. - Added specific handling of "return true" and "return false" to the filter loop compiler. Makes the compiled function easier to read.
* Fixed example4 and a bug in a DataView filter compilation.Michael Leibman2011-11-051-2/+2
|
* Continuation of DataView perf workMichael Leibman2011-10-311-30/+84
| | | | | | | - Reverted the batched filter functions and implemented dynamic recompilation instead. - Added compilation of an optimized filter loop for the "isFilterExpanding" hint.
* DataView grouping perfMichael Leibman2011-10-301-51/+59
| | | | | | | | | Optimized DataView grouping by dynamically compiling the aggregator accumulation loop and inlining the accumulator function. This removes the function call overhead and considerably speeds up aggregate calculation for large numbers of items. One caveat is that aggregators now have to be self-contained and not reference any variables outside of the "this" scope.
* DataView perfomance.Michael Leibman2011-10-291-48/+94
| | | | | | | | | | | | | DataView: - ability to specify a batch filter function. This cuts down on a function invocation overhead. - refresh hints (isFilterUnchanged, isFilterExpanding, isFilterNarrowing). - ability to set a range of rows which should be checked for diffs in the onRowsChanged event (this is typically the grid rendered range; ignoreDiffsBefore, ignoreDiffsAfter). Also added an example demonstrating the usage.
* Optimized DataView's addItem/insertItem/deleteItem.Michael Leibman2011-03-161-20/+39
|
* Fixed example pages using DataView.Michael Leibman2011-03-111-1/+5
| | | | DataView now lazy-inits the GroupItemMetadataProvider only when grouping is performed, so no need to include its .js file if grouping isn't needed.
* Moved group and totals row handling out of DataView and client pages and ↵mleibman2011-03-061-30/+9
| | | | into a Slick.Data.GroupItemMetadataProvider responsible for overriding the look and behavior of group and totals rows and providing expand/collapse functionality by acting as a grid plugin (still needs to be registered with the grid on the client page).
* Cleaned up column width calculations and removed syncColumnCellResize option.mleibman2011-02-221-17/+64
| | | | | | | | | | | | | | | | | | Added a way to provide row and/or cell specific metadata: The item metadata is retrieved separately from the item itself. It is done via the optional "getItemMetadata(index)" method on the data provider. The method should return an object that will be queried by the grid. The object can contain row-level properties itself (currently supported: selectable, focusable, cssClasses, formatter, editor) and a "columns" collection with column-level properties (currently supported: selectable, focusable, cssClasses, formatter, editor, colspan) indexed by column id or index. The grid will first try to read a supported property off row-level metadata, then off column-level metadata first by id and then by index, and then off the column definition. Renamed "unselectable" into "selectable" and changed how it works. It is now queried in the order described above, and the first available value is read. The new "focusable" property works the same way. Separated logic for determining whether a cell can be active/focused and selected. Added "canCellBeActive" method. Removed grouping-related code from the grid core and implemented it via "getItemMetadata" on the DataView. Rewrote cell navigation to work with colspan. Added support for colspan. Colspan can be defined on the column definition (or item metadata via getItemMetadata). A special value of "*" is taken to mean "span the rest of the row". TODO: Further decouple grouping. Add a grouping plugin to handle toggling and provide formatters. Move that stuff out of the DataView.
* Rolled back previous DataView optimization since it was flawed.mleibman2011-01-031-58/+47
| | | | | More refactoring. Moved group sorting after the aggregation so that totals can be used in the comparer.
* Added refresh hints to DataView to avoid unnecessary calculations. Only ↵mleibman2011-01-031-30/+47
| | | | used in expandGroup/collapseGroup right now.
* Added direct totals ref to Group.mleibman2011-01-021-117/+147
| | | | | | | Added internal markers (__nonDataRow, __group, __groupTotals) to NonDataRow, Group & GroupTotals for use instead of "instanceof", which is very slow. Brought back DataView.fastSort and sort direction in DataView.sort and rewrote the grouping logic to always sort groups first and then merge in the items in the original order. The downside is that we can no longer group items and have them retain the original order (which I thought was very cool), but the old approach just didn't work with fastSort and, without it, IE<9 was useless beyond 10K items or so because of its deficient sort implementation. There is one upside - group comparer now gets the group instance and not a grouping value, meaning that we can sort groups on things like counts and aggregation results. Median performance is down, but IE (the lowest common denominator) is much faster. Refactored the DataView recalc code for clarity. Other minor changes in DataView.
* DataView code cleanup.mleibman2011-01-011-27/+39
| | | | Fixed paging when using a DataView without a filter.
* Micro-optimizations for DataView grouping/refresh.mleibman2010-12-311-19/+26
| | | | | 35.6% faster on IE8. 21% faster on FF3.6.
* Added a "group" property to GroupTotals.mleibman2010-12-301-7/+23
| | | | | Exposed groups and totals in the DataView. Removed most stuff not relevant to grouping from the grouping example and added a few controls to test the behavior.
* This is likely unfinished and buggy, but it is waaay too cool not to check ↵mleibman2010-12-301-62/+270
| | | | | | | | | | | | | | | | in now! Added Slick.NonDataRow and deriving Slick.Group and Slick.GroupTotals classes that the grid recognizes. Added grouping and aggregation support to the DataView. DataView.groupBy() takes in a grouping value getter (either a property name or a function), a grouping value formatter, and an optional sort comparer. The sort comparer is pretty slick. Unlike most other implementations, SlickGrid's grouping does not force you into any particular order. It can take your data just the way it is ordered and simply break it into groups. Essentially, you can end up with multiple groups with the same value in different places. If you do specify the grouping sort, however, you get a more traditional ordering where the items are first ordered by the groups and, then, ordered by whatever you normally sort by withing the groups. DataView now also supports custom aggregators and group expanding/collapsing. Several reference aggregators are included in Slick.Data. Totals row cells are formatted using the "groupTotalsFormatter" specified on the column definition. To maintain a consistent API, I've decided to remove the "fastSort" DataView method. For IE8 and lower, it may be better to override Array.prototype.sort with a custom quicksort or mergesort implementation. Overriding the Object.toString works great, but it requires a different way of specifying the sort. Also for consistency's sake, I've removed the DataView.rows collection. DataView now exposes GetItem() and GetLength() and can be used as a databinding source directly.
* Exposed getItem/getLength on the DataView to make it usable as a datasource ↵mleibman2010-12-141-0/+11
| | | | for the grid directly (and not just through dataView.rows). That may help keep things a bit cleaner as the event handlers would be able to get the DataView by calling grid.getData().
* Added a mechanism to set scope ("this") in events.mleibman2010-12-091-4/+4
| | | | | Grid and DataView now set the scope to the instance. Corrected args format in events in DataView.
* Initial commit of v2.0 alpha.mleibman2010-11-261-0/+274
This major update is focused around API usability, consistency and extensibility, events, and breaking out selection and drag'n'drop functionality into external plugins. Expect this code to be incomplete and buggy at this point. Since there are so many API changes, I am not making any attempt to retain backwards compatibility. Hence the new major version.