| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Make DataView. syncGridSelection() return an event that notifies when
an internal list of selected row ids changes.
|
|
|
|
| |
selection changes (preserveHiddenOnSelectionChange)
|
| |
|
|\
| |
| | |
Improve `return` matching for inlined filter functions
|
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
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
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
specified
|
| |
|
| |
|
|
|
|
|
|
| |
Closure Compiler
compileFilter(): Rewrote function templates to survive JS compression whilst preserving original behavior
|
|
|
|
| |
function names for easier profiling (only works in webkit; don't know of any other supported variants).
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
| |
- Reverted the batched filter functions and implemented dynamic
recompilation instead.
- Added compilation of an optimized filter loop for the
"isFilterExpanding" hint.
|
|
|
|
|
|
|
|
|
| |
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:
- 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.
|
| |
|
|
|
|
| |
DataView now lazy-inits the GroupItemMetadataProvider only when grouping is performed, so no need to include its .js file if grouping isn't needed.
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
More refactoring.
Moved group sorting after the aggregation so that totals can be used in the comparer.
|
|
|
|
| |
used in expandGroup/collapseGroup right now.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixed paging when using a DataView without a filter.
|
|
|
|
|
| |
35.6% faster on IE8.
21% faster on FF3.6.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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().
|
|
|
|
|
| |
Grid and DataView now set the scope to the instance.
Corrected args format in events in DataView.
|
|
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.
|