This release is mainly focused on fixing the grid layout/column widths:
- Removed border-left and border-right from columns. Now we are using vertical bars so if someone sets a width to be 400px for a column, the column will actually be 400px, not 401-402px due to the border. This caused the horizontal overflowing to happen producing a horizontal scrollbar. This also fixed issues like angular-ui#411 where you would see columns not extend all the way to the edge and you would get double borders
- Percent calculation is handled before asterisks calculations because percent calculation should take higher priority, and the asterisks calculations will then be able to fill the remaining space instead of horizontally overflowing the viewport
A fix contributed by @swalters for #436:
When editing a cell, the ng-cell-has-focus directive will broadcast a message named ngGridEventStartCellEdit to let all children know that you can now give yourself focus. When the editable cell template is done with editing (usually on a blur event) you need to emit ngGridEventEndCellEdit to let ng-cell-has-focus know that you are done editing and it will then show the non-editable cell template. The reasoning for this is (good quote): "Now I can wrap my input elements in divs/spans, whatever and control exactly what element's blur triggers the end edit" - @swalters. An example (used for ng-input directive):
scope.$on('ngGridEventStartCellEdit', function () { elm.focus(); });
angular.element(elm).bind('blur', function () { scope.$emit('ngGridEventEndCellEdit'); });
Also, there is another option now which is enableCellEditOnFocus (yes, it's coming back) so now you can choose between excel-like editing or enabling edit mode on focus.
Also some fixes contributed by @ebbe-brandstrup are:
- Columns sized with * or % now expand / shrink as other * or %-based columns are hidden / shown
- Note: the changes auto-expand/shrink only take effect on-the-fly
- Works with grouping and when enabling the selection checkbox row (showSelectionCheckbox)
- Bugfixes in configureColumnWidths
- Re-ordered columns now keep their width setup
- Fixed "asteriskNum" so it no longer includes hidden columns (was checking .visible on a columnDefs column instead of the matching ngColumn)
- Fixed "totalWidth" so it no longer includes hidden columns when using px values for width (was checking .visible on a columnDefs column instead of the matching ngColumn)
- Fixed ngColumn width being initialized to undefined when using "auto" for width, regardless of "minWidth" settings (was checking .minWidth on a columnDefs column instead of the matching ngColumn)
Renamed "col" to "colDef" in configureColumnWidths() in the places where "col" was a column from "columnDefs". It made it clearer for me whether I was referring to a ngColumn or a column from columnDefs. There were a couple of bugs caused by that (col.visible incorrectly accessed on columnDefs objects instead of ngColumns, and the like).
- Bugfixes in ng-grid-flexible-height
- The plugin couldn't shrink the grid, only grow it
- Using domUtilityService.UpdateGridLayout instead of grid.refreshDomSizes which correctly grows the grid if it's been shrunk (e.g. when paging to the last page and it has few rows + the plugin has a smaller min. height than what's needed on the other pages)
Too many to list. Here is the pull request angular-ui#511
-
Development
- Continuous integration testing with Travis CI. A few tests that were looking for pixel perfection had to be relaxed due to rendering differences between browsers and OSes.
- Moved this changelog to CHANGELOG.md!
- Added tests for i18n languages. Any new language must cover all the properties that the default language (English) has.
- CSS files compiling with less (24bb173)
- Added optional --browsers flag for test tasks.
grunt test --browsers=Chrome,Firefox,PhantomJS
will test in all 3 browsers at once.
-
Sorting
-
i18n
- Added Brazilian Portugeuse (thanks @dipold) (ab0f207)
- Allow column
displayName
to be an empty string. (#363, 46a992f) - Fix for
totalServerItems
not updating (#332, #369, fcfe316) - Fixed regression in 2.0.5 that used Array.forEach, which isn't supported in IE8. Moved to angular.forEach (e4b08a7)
- Fixed and added tests for wysiwyg-export plugin (57df36f)
- Fixed extraneous trailing comma (#449, 2c655c7)
- Cell editing - various attempts at fixing broken cell editing eventually resulted in using NgModelController (thanks @swalters). (#442, 050a1ba, 5c82f9b, 5c82f9b, f244363, ee2a5f1)
- Moving to $http for external template fetching. Should fix issues with grid rendering before templates are retrieved, as well as fetching the same template multiple times.
- Fixed bug that prevented the grid from maintaining row selections post-sort thanks to sum4me
- Fixing some more minor bugs
- Changed default multiSelect behavior, updating some plugins and making some more minor bugfixes.
- minor bugfixes, updating some plugins.
- Moved to grunt build system. No more international version; all languages are included by default. Fixed minor grouping display issue. Using $templateCache for templates instead of global namespace.
- Breaking Changes: see documentation (showSelectionBox, enableRowSelection, showFooter). Column Virtualization added. Row virtualization performance improved. Excel-like editing instead of enableFocusedCellEdit.
- Aggregates now display correctly. Added more option methods to select and group data (see wiki), Added column pinning.
- Fixes for multi-level grouping and adding the gridId to both the grid options and as argument to the "ngGridEventData" so you can identify what grid it came from.
- Major architectural changes which greatly improves performance. virtualizationThreshold now controlls when virtualization is force-enabled and is user-specified in options.
- Fixed bug with selections and multiple grids. New emit message for notifying when hitting bottom of viewport. Can disable virtualization. ng-grid virtualization is on by default, but can be disabled if there are less than 50 rows in the grid. Anything > 50 rows virtualization is forced on for performance considerations.
- BREAKING CHANGES: Will add examples. Adding cell selection, navigation, and edit on focus. Added programmatic selections. Improved scrolling. ngGridEvents changed/added: see wiki.
- Can now highlight/copy text in grid. Fixed multiple issues when using multiselect along with shift key. Refactored key events so now they are all in the same directive for viewport. Hovering over highlightable text will change cursors in viewport. Fixed #93.
- Merged changes to have two-way data-binding work in templates, so if you're using a celltemplate, you can now use COL_FIELD instead of row.getProperty(col.field). row.getProperty is still in the row class for accessing other row values.
- Adding ability to preselect rows. Can deselect when multiSelect:false. Bug fixes/merging pull requests. Bower now works. Can now sync external search with ng-grid internal search. Check out other examples on examples page.
- Adding i18n support and support for different angularjs interpolation symbols (requires building from source).
- Modifying the way we watch for array changes. Added groupable column definition option. Bugfixes for #58, #59.
- jslint reformat, minor bugfixes, performance improvements while keydown navigating, adding "use strict" to script.
- Massive improvements to search thanks to iNeedFat!
- Refactored and removed unneeded code. Added scope events.
- Improving template compilation and fixing jquery theme support. Improving comments on grid options.
- sortInfo can now be set to default sort the grid. Improvements to the beforeSelectionChange callback mechanism when multi-selecting.
- Improved template rendering when using external template files. columnDefs can now be a $scope object which can be push/pop/spliced. Fixed box model for cells and header cells.
- Improved aggregate grouping, minor bugfixes. Auto-width works!
- Changed default width behavior to use *s and added option to maintain column ratios while resizing
- Added layout plugin. Support for uri templates. Performance improvements.
- Major code refactoring, can now group-by using column menu, changes to build
- Built-in filtering support, numerous perfomance enhancements and minor code refactoring
- Added ability to specify property "paths" as fields and for grid options.
- Added Server-Side Paging support and minor bug fixes.
- Added ability to hide/show columns and various bug fixes/performance enhancements.
- Release