Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review and remove deprecated properties and events from the grids #12832

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d3ac733
feat(*): remove all deprecated props and methods related to paginatio…
ddincheva Mar 30, 2023
4caec59
test(Paging): refactor the tests that used deprecated paging API #12810
ddincheva Mar 30, 2023
426ff00
test(Paging): refactor the paging test that are using deprecated API …
ddincheva Mar 30, 2023
826b80c
chore(*): remove some fdescribe
ddincheva Mar 31, 2023
ed48309
chore(*): update failing test
ddincheva Mar 31, 2023
34cc74f
refactor(Grid): remove deprecated input props for even and odd row st…
ddincheva Mar 31, 2023
17ab385
refactor(Grid): deprecate rowID and rowData props from the grid event…
ddincheva Apr 3, 2023
23af0f8
chore(*): address review comment for editDoneArgs
ddincheva Apr 3, 2023
c1f4830
chore(*): update the tests according new API changes
ddincheva Apr 3, 2023
6641b60
chore(*): fix tests accordinly newly addressed API changes
ddincheva Apr 3, 2023
04e811f
chore(*): fix rowEditDone event args
ddincheva Apr 4, 2023
e514c32
fix(*): do not clear summaries when row edit is not complete #10617
ddincheva Apr 4, 2023
2f19061
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
ddincheva Apr 4, 2023
744429e
refactor(Grid): remove getCellByColumnVisibleIndex #12810
ddincheva Apr 4, 2023
7e09db6
Merge branch 'master' into ddincheva/deprecatedPropRemoval
hanastasov Apr 7, 2023
a6ac2a8
Merge branch 'master' into ddincheva/deprecatedPropRemoval
kdinev Apr 10, 2023
e236c8b
Update projects/igniteui-angular/src/lib/grids/summaries/grid-summary…
ddincheva Apr 10, 2023
accb4f0
Update projects/igniteui-angular/src/lib/grids/summaries/grid-summary…
ddincheva Apr 10, 2023
69978b0
chore(*): use internal page and perPage props instead always check fo…
ddincheva Apr 10, 2023
25cd94b
chore(*): update the changelog with all removed and deprecated props
ddincheva Apr 10, 2023
2f0dea8
Merge branch 'ddincheva/deprecatedPropRemoval' of https://github.com/…
ddincheva Apr 10, 2023
01cc7a6
Merge branch 'master' into ddincheva/deprecatedPropRemoval
zdrawku Apr 13, 2023
2190d0e
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
ddincheva Apr 27, 2023
5348679
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
ddincheva Apr 27, 2023
603cd1d
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
ddincheva May 5, 2023
1eb40c7
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
ddincheva May 10, 2023
72786bf
chore(*): fix linting errors
ddincheva May 10, 2023
32450c0
fix(*): fix failing test for missing imports
ddincheva May 10, 2023
2f8809b
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
ddincheva May 10, 2023
4fbb343
Merge branch 'master' into ddincheva/deprecatedPropRemoval
ddincheva May 11, 2023
7c85f6e
Merge branch 'master' into ddincheva/deprecatedPropRemoval
zdrawku May 11, 2023
b92d8ff
chore(grid): separate grid and cell event interfaces, events reorgani…
hanastasov May 11, 2023
e29a24b
chore(*): add proper description for interfaces
hanastasov May 11, 2023
1d35efc
Merge branch 'master' into ddincheva/deprecatedPropRemoval
hanastasov May 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# Ignite UI for Angular Change Log

All notable changes for each version of this project will be documented in this file.
## 16.0.0
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
- **Breaking Changes**
The following deprecated grid properties in version 12.1.0 are now removed:
- *evenRowCSS*;
- *oddRowCSS*;
- *page*;
- *paging*;
- *perPage*;
- *totalPages*;
- *isFirstPage*;
- *isLastPage*;
- *pageChange*;
Also the following deprecated grid events are removed.
- *perPageChange*;
- *pagingDone*;
Deprecated methods removed from the grid API are:
- *nextPage*;
- *previousPage*;
- *paginate*;
- *getCellByColumnVisibleIndex*;
- **Breaking Changes** In the `IgxAddRowParent`, `IRowToggleEventArgs`, `IPinRowEventArgs` and `IPathSegment` interfaces the *rowID* property has been deprecated and a *key* property has been introduced instead;
- **Breaking Changes** In the `IGridEditDoneEventArgs` interface *rowID* and *rowData* properties are deprecated and new *data* property has been introduced.

## 16.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ describe('igxGridEditingActions #grid ', () => {
expect(grid.rowPinning.emit).toHaveBeenCalledTimes(1);
expect(grid.rowPinning.emit).toHaveBeenCalledWith({
rowID : row.key,
key: row.key,
insertAtIndex: 0,
isPinned: true,
row,
Expand All @@ -220,6 +221,7 @@ describe('igxGridEditingActions #grid ', () => {
expect(grid.rowPinning.emit).toHaveBeenCalledTimes(2);
expect(grid.rowPinning.emit).toHaveBeenCalledWith({
rowID : row5.key,
key: row5.key,
insertAtIndex: 1,
isPinned: true,
row: row5,
Expand Down Expand Up @@ -360,6 +362,7 @@ describe('igxGridEditingActions #grid ', () => {
primaryKey: row.key,
cancel: false,
rowData: treeGrid.getRowData(row.key),
data: treeGrid.getRowData(row.key),
oldValue: null,
owner: treeGrid
};
Expand Down
9 changes: 0 additions & 9 deletions projects/igniteui-angular/src/lib/grids/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,6 @@ Below is the list of all inputs that the developers may set to configure the gri
|`autoGenerateExclude`|Array|A list of property keys to be excluded from the generated column collection, default is _[]_|
|`batchEditing`|boolean|Toggles batch editing in the grid, default is _false_|
|`moving`|boolean|Enables the columns moving feature. Defaults to _false_|
|`paging`|boolean|Enables the paging feature. Defaults to _false_.|
|`page`| number | The current page index.|
|`perPage`|number|Visible items per page, default is 15|
|`allowFiltering`| boolean | Enables quick filtering functionality in the grid. |
|`allowAdvancedFiltering`| boolean | Enables advanced filtering functionality in the grid. |
|`filterMode`| `FilterMode` | Determines the filter mode, default value is `quickFilter`.|
Expand All @@ -184,8 +181,6 @@ Below is the list of all inputs that the developers may set to configure the gri
|`rowSelectable`|boolean|Enables multiple row selection, default is _false_.|
|`height`|string|The height of the grid element. You can pass values such as `1000px`, `75%`, etc.|
|`width`|string|The width of the grid element. You can pass values such as `1000px`, `75%`, etc.|
|`evenRowCSS`|string|Additional styling classes applied to all even rows in the grid.|
|`oddRowCSS`|string|Additional styling classes applied to all odd rows in the grid.|
|`paginationTemplate`|TemplateRef|You can provide a custom `ng-template` for the pagination part of the grid.|
|`groupStrategy`| IGridGroupingStrategy | Provides custom group strategy to be used when grouping |
|`groupingExpressions`| Array | The group by state of the grid.
Expand Down Expand Up @@ -237,7 +232,6 @@ A list of the events emitted by the **igx-grid**:
|`columnInit`|Emitted when the grid columns are initialized. Returns the column object.|
|`sortingDone`|Emitted when sorting is performed through the UI. Returns the sorting expression.|
|`filteringDone`|Emitted when filtering is performed through the UI. Returns the filtering expressions tree of the column for which the filtering was performed.|
|`pagingDone`|Emitted when paging is performed. Returns an object consisting of the previous and the new page.|
|`rowAdded`|Emitted when a row is being added to the grid through the API. Returns the data for the new row object.|
|`rowDeleted`|Emitted when a row is deleted through the grid API. Returns the row object being removed.|
|`dataPreLoad`| Emitted when a new chunk of data is loaded from virtualization. |
Expand Down Expand Up @@ -287,9 +281,6 @@ Here is a list of all public methods exposed by **igx-grid**:
|`enableSummaries(expressions: Array)`|Enable summaries for the columns and apply your `customSummary` if it is provided.|
|`disableSummaries(fieldName: string)`|Disable summaries for the specified column.|
|`disableSummaries(columns: string[])`|Disable summaries for the listed columns.|
|`previousPage()`|Goes to the previous page if paging is enabled and the current page is not the first.|
|`nextPage()`|Goes to the next page if paging is enabled and current page is not the last.|
|`paginate(page: number)`|Goes to the specified page if paging is enabled. Page indices are 0 based.|
|`markForCheck()`|Manually triggers a change detection cycle for the grid and its children.|
|`pinColumn(name: string): boolean`|Pins a column by field name. Returns whether the operation is successful.|
|`unpinColumn(name: string): boolean`|Unpins a column by field name. Returns whether the operation is successful.|
Expand Down
17 changes: 9 additions & 8 deletions projects/igniteui-angular/src/lib/grids/api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { IFilteringExpressionsTree } from '../data-operations/filtering-expressi
import { Transaction, TransactionType, State } from '../services/transaction/transaction';
import { IgxCell, IgxGridCRUDService, IgxEditRow } from './common/crud.service';
import { CellType, ColumnType, GridServiceType, GridType, RowType } from './common/grid.interface';
import { IGridEditEventArgs, IPinRowEventArgs, IRowToggleEventArgs } from './common/events';
import { ICellEditEventArgs, IPinRowEventArgs, IRowToggleEventArgs } from './common/events';
import { IgxColumnMovingService } from './moving/moving.service';
import { IGroupingExpression } from '../data-operations/grouping-expression.interface';
import { ISortingExpression, SortingDirection } from '../data-operations/sorting-strategy';
Expand Down Expand Up @@ -137,13 +137,14 @@ export class GridBaseAPIService<T extends GridType> implements GridServiceType {
}
}

public update_cell(cell: IgxCell): IGridEditEventArgs {
public update_cell(cell: IgxCell): ICellEditEventArgs {
if (!cell) {
return;
}
const args = cell.createEditEventArgs(true);

this.grid.summaryService.clearSummaryCache(args);
const args = cell.createCellEditEventArgs(true);
if (!this.grid.crudService.row) {
ddincheva marked this conversation as resolved.
Show resolved Hide resolved
this.grid.summaryService.clearSummaryCache(args);
}
const data = this.getRowData(cell.id.rowID);
const newRowData = reverseMapper(cell.column.field, args.newValue);
this.updateData(this.grid, cell.id.rowID, data, cell.rowData, newRowData);
Expand Down Expand Up @@ -187,7 +188,7 @@ export class GridBaseAPIService<T extends GridType> implements GridServiceType {
const hasSummarized = grid.hasSummarizedColumns;
this.crudService.updateRowEditData(row, value);

const args = row.createEditEventArgs(true, event);
const args = row.createRowEditEventArgs(true, event);

// If no valid row is found
if (index === -1) {
Expand Down Expand Up @@ -424,7 +425,7 @@ export class GridBaseAPIService<T extends GridType> implements GridServiceType {
}

const args: IRowToggleEventArgs = {
rowID,
rowID, key: rowID,
expanded,
event,
cancel: false
Expand Down Expand Up @@ -585,7 +586,7 @@ export class GridBaseAPIService<T extends GridType> implements GridServiceType {
public get_pin_row_event_args(rowID: any, index?: number, row?: RowType, pinned?: boolean) {
const eventArgs: IPinRowEventArgs = {
isPinned: pinned ? true : false,
rowID,
rowID, key: rowID,
row,
cancel: false
}
Expand Down
Loading