Skip to content

Commit 500839d

Browse files
committed
feat(*): remove deprecated properties and add toolbar input for button action
1 parent 5687ab5 commit 500839d

16 files changed

+41
-262
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ All notable changes for each version of this project will be documented in this
2323
};
2424
this.alert.positionSettings = this.newPositionSettings;
2525
```
26-
26+
- `igxGrid`, `igxHierarchicalGrid`, `igxTreeGrid`
27+
- **Breaking Change** - The following deprecated inputs have been removed
28+
- Inputs `showToolbar`, `toolbarTitle`, `columnHiding`, `columnHidingTitle`, `columnPinning`,
29+
`columnPinningTitle`, `pinnedColumnsText`.
30+
Use `IgxGridToolbarComponent`, `IgxGridToolbarHidingComponent`, `IgxGridToolbarPinningComponent` instead.
31+
- `IgxColumnActionsComponent`
32+
- **Breaking Change** - The following input has been removed
33+
- Input `columns`. Use `igxGrid` input instead.
2734
## 12.2.1
2835

2936
### New Features

projects/igniteui-angular/src/lib/grids/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,9 @@ Below is the list of all inputs that the developers may set to configure the gri
193193
|`transactions`| `TransactionService` | Transaction provider allowing access to all transactions and states of the modified rows. |
194194
|`summaryPosition`| GridSummaryPosition | The summary row position for the child levels. The default is top. |
195195
|`summaryCalculationMode`| GridSummaryCalculationMode | The summary calculation mode. The default is rootAndChildLevels, which means summaries are calculated for root and child levels.|
196-
|`columnHiding`| boolean | Returns whether the column hiding UI for the `IgxGridComponent` is enabled.|
197-
| `columnHidingTitle`| string | The title to be displayed in the built-in column hiding UI.|
198-
| `columnPinning` | boolean | Returns if the built-in column pinning UI should be shown in the toolbar. |
199-
| `columnPinningTitle` | string | The title to be displayed in the UI of the column pinning.|
200196
| `rowHeight` | number | Sets the row height. |
201197
| `columnWidth` | string | The default width of the `IgxGridComponent`'s columns. |
202198
|`primaryKey`| any | Property that sets the primary key of the `IgxGridComponent`. |
203-
|`hiddenColumnsText`| string | The text to be displayed inside the toggle button for the built-in column hiding UI of the`IgxColumnComponent`. |
204-
|`pinnedColumnsText`| string | the text to be displayed inside the toggle button for the built-in column pinning UI of the`IgxColumnComponent`. |
205-
|`showToolbar`| boolean | Specifies whether the `IgxGridComponent`'s toolbar is shown or hidden.|
206199
|`toolbarTitle`| string | the toolbar's title. |
207200
|`exportExcel`| boolean | Returns whether the option for exporting to MS Excel is enabled or disabled. |
208201
|`exportCsv`| boolean | Returns whether the option for exporting to CSV is enabled or disabled.|

projects/igniteui-angular/src/lib/grids/column-actions/column-actions.component.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -172,27 +172,6 @@ export class IgxColumnActionsComponent implements DoCheck {
172172
this._differ = this.differs.find([]).create(this.trackChanges);
173173
}
174174

175-
/**
176-
* Gets the grid columns to provide an action for.
177-
*
178-
* @deprecated
179-
* @example
180-
* ```typescript
181-
* let gridColumns = this.columnActions.columns;
182-
* ```
183-
*/
184-
@DeprecateProperty(`Deprecated. Use 'grid' input instead.`)
185-
@Input()
186-
public get columns() {
187-
return this.grid?.columns;
188-
}
189-
190-
public set columns(value) {
191-
if (value && value.length > 0) {
192-
this.grid = value[0].grid;
193-
}
194-
}
195-
196175
/**
197176
* Gets the prompt that is displayed in the filter input.
198177
*

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 10 additions & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
400400
*
401401
* @example
402402
* ```html
403-
* <igx-grid #grid [data]="localData" [showToolbar]="true" [primaryKey]="'ProductID'" [autoGenerate]="true"></igx-grid>
403+
* <igx-grid #grid [data]="localData" [primaryKey]="'ProductID'" [autoGenerate]="true"></igx-grid>
404404
* ```
405405
*/
406406
@WatchChanges()
@@ -813,7 +813,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
813813
* Args: { column: any, newValue: boolean }
814814
* @example
815815
* ```html
816-
* <igx-grid [columnHiding]="true" [showToolbar]="true" (columnVisibilityChanging)="visibilityChanging($event)"></igx-grid>
816+
* <igx-grid (columnVisibilityChanging)="visibilityChanging($event)"></igx-grid>
817817
* ```
818818
*/
819819
@Output()
@@ -826,7 +826,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
826826
* Args: { column: IgxColumnComponent, newValue: boolean }
827827
* @example
828828
* ```html
829-
* <igx-grid [columnHiding]="true" [showToolbar]="true" (columnVisibilityChanged)="visibilityChanged($event)"></igx-grid>
829+
* <igx-grid (columnVisibilityChanged)="visibilityChanged($event)"></igx-grid>
830830
* ```
831831
*/
832832
@Output()
@@ -839,7 +839,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
839839
* Returns the moved `IgxColumnComponent` object.
840840
* @example
841841
* ```html
842-
* <igx-grid [columnHiding]="true" [showToolbar]="true" (columnMovingStart)="movingStart($event)"></igx-grid>
842+
* <igx-grid (columnMovingStart)="movingStart($event)"></igx-grid>
843843
* ```
844844
*/
845845
@Output()
@@ -852,7 +852,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
852852
* Returns the source and target `IgxColumnComponent` objects. This event is cancelable.
853853
* @example
854854
* ```html
855-
* <igx-grid [columnHiding]="true" [showToolbar]="true" (columnMoving)="moving($event)"></igx-grid>
855+
* <igx-grid (columnMoving)="moving($event)"></igx-grid>
856856
* ```
857857
*/
858858
@Output()
@@ -865,7 +865,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
865865
* Returns the source and target `IgxColumnComponent` objects.
866866
* @example
867867
* ```html
868-
* <igx-grid [columnHiding]="true" [showToolbar]="true" (columnMovingEnd)="movingEnds($event)"></igx-grid>
868+
* <igx-grid (columnMovingEnd)="movingEnds($event)"></igx-grid>
869869
* ```
870870
*/
871871
@Output()
@@ -1567,28 +1567,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
15671567
}
15681568
}
15691569

1570-
/**
1571-
* Gets/Sets whether the column hiding UI is enabled.
1572-
*
1573-
* @deprecated
1574-
* @remarks
1575-
* By default it is disabled (false). In order for the UI to work, you need to enable the toolbar as shown in the example below.
1576-
* @example
1577-
* ```html
1578-
* <igx-grid [data]="Data" [autoGenerate]="true" [showToolbar]="true" [columnHiding]="true"></igx-grid>
1579-
* ```
1580-
*/
1581-
@DeprecateProperty('`columnHiding` is deprecated.')
1582-
@Input()
1583-
public get columnHiding() {
1584-
return this._columnHiding;
1585-
}
1586-
1587-
public set columnHiding(value) {
1588-
this._columnHiding = value;
1589-
this.notifyChanges();
1590-
}
1591-
15921570
/**
15931571
* Gets/Sets if the row selectors are hidden.
15941572
*
@@ -1646,7 +1624,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
16461624
* By default it is set to false.
16471625
* @example
16481626
* ```html
1649-
* <igx-grid #grid [showToolbar]="true" [rowEditable]="true" [primaryKey]="'ProductID'" [columnHiding]="true"></igx-grid>
1627+
* <igx-grid #grid [rowEditable]="true" [primaryKey]="'ProductID'" ></igx-grid>
16501628
* ```
16511629
*/
16521630
@WatchChanges()
@@ -1733,7 +1711,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
17331711
*
17341712
* @example
17351713
* ```html
1736-
* <igx-grid #grid [data]="localData" [showToolbar]="true" [rowHeight]="100" [autoGenerate]="true"></igx-grid>
1714+
* <igx-grid #grid [data]="localData" [rowHeight]="100" [autoGenerate]="true"></igx-grid>
17371715
* ```
17381716
*/
17391717
@WatchChanges()
@@ -1751,7 +1729,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
17511729
*
17521730
* @example
17531731
* ```html
1754-
* <igx-grid #grid [data]="localData" [showToolbar]="true" [columnWidth]="100" [autoGenerate]="true"></igx-grid>
1732+
* <igx-grid #grid [data]="localData" [columnWidth]="100" [autoGenerate]="true"></igx-grid>
17551733
* ```
17561734
*/
17571735
@WatchChanges()
@@ -1839,30 +1817,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
18391817
return this._emptyFilteredGridMessage || this.resourceStrings.igx_grid_emptyFilteredGrid_message;
18401818
}
18411819

1842-
/**
1843-
* Gets/Sets the title to be displayed in the built-in column hiding UI.
1844-
*
1845-
* @deprecated
1846-
*
1847-
* @example
1848-
* ```html
1849-
* <igx-grid [showToolbar]="true" [columnHiding]="true" columnHidingTitle="Column Hiding"></igx-grid>
1850-
* ```
1851-
*/
1852-
@DeprecateProperty('`columnHidingTitle` is deprecated')
1853-
@Input()
1854-
public get columnHidingTitle(): string {
1855-
return this._columnHidingTitle;
1856-
}
1857-
public set columnHidingTitle(v: string) {
1858-
this._columnHidingTitle = v;
1859-
}
1860-
1861-
/** @hidden @internal */
1862-
public get columnHidingTitleInternal(): string {
1863-
return this._columnHidingTitle;
1864-
}
1865-
18661820
/**
18671821
* Gets/Sets the initial pinning configuration.
18681822
*
@@ -1885,51 +1839,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
18851839
this._pinning = value;
18861840
}
18871841

1888-
1889-
/**
1890-
* Gets/Sets if the built-in column pinning UI should be shown in the toolbar.
1891-
*
1892-
* @deprecated
1893-
*
1894-
* @example
1895-
* ```html
1896-
* <igx-grid #grid [data]="localData" [columnPinning]="'true" [height]="'305px'" [autoGenerate]="true"></igx-grid>
1897-
* ```
1898-
*/
1899-
@DeprecateProperty('`columnPinning` is deprecated')
1900-
@Input()
1901-
public get columnPinning() {
1902-
return this._columnPinning;
1903-
}
1904-
public set columnPinning(value) {
1905-
this._columnPinning = value;
1906-
this.notifyChanges();
1907-
}
1908-
1909-
/**
1910-
* Gets/Sets the title to be displayed in the UI of the column pinning.
1911-
*
1912-
* @deprecated
1913-
*
1914-
* @example
1915-
* ```html
1916-
* <igx-grid #grid [data]="localData" [columnPinning]="'true" [columnPinningTitle]="'Column Hiding'" [autoGenerate]="true"></igx-grid>
1917-
* ```
1918-
*/
1919-
@DeprecateProperty('`columnPinningTitle` is deprecated')
1920-
@Input()
1921-
public get columnPinningTitle(): string {
1922-
return this._columnPinningTitle;
1923-
}
1924-
public set columnPinningTitle(v: string) {
1925-
this._columnPinningTitle = v;
1926-
}
1927-
1928-
/** @hidden @internal */
1929-
public get columnPinningTitleInternal(): string {
1930-
return this._columnPinningTitle;
1931-
}
1932-
19331842
/**
19341843
* Gets/Sets if the filtering is enabled.
19351844
*
@@ -1964,7 +1873,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
19641873
*
19651874
* @example
19661875
* ```html
1967-
* <igx-grid #grid [data]="localData" [allowAdvancedFiltering]="true" [showToolbar]="true" [autoGenerate]="true"></igx-grid>
1876+
* <igx-grid #grid [data]="localData" [allowAdvancedFiltering]="true" [autoGenerate]="true"></igx-grid>
19681877
* ```
19691878
*/
19701879
@Input()
@@ -2429,52 +2338,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
24292338
return this.pinnedColumns.filter(col => !col.columnLayout).length;
24302339
}
24312340

2432-
/**
2433-
* Gets/Sets the text to be displayed inside the toggle button.
2434-
*
2435-
* @deprecated
2436-
*
2437-
* @remarks
2438-
* Used for the built-in column hiding UI of the`IgxColumnComponent`.
2439-
* @example
2440-
* ```html
2441-
* <igx-grid [columnHiding]="true" [showToolbar]="true" [hiddenColumnsText]="'Hidden Columns'"></igx-grid>
2442-
* ```
2443-
*/
2444-
// @DeprecateProperty('`hiddenColumnsText` is deprecated')
2445-
@Input()
2446-
public get hiddenColumnsText() {
2447-
return this._hiddenColumnsText;
2448-
}
2449-
2450-
public set hiddenColumnsText(value) {
2451-
this._hiddenColumnsText = value;
2452-
this.notifyChanges();
2453-
2454-
}
2455-
2456-
/**
2457-
* Gets/Sets the text to be displayed inside the toggle button.
2458-
*
2459-
* @deprecated
2460-
*
2461-
* @remarks
2462-
* Used for the built-in column pinning UI of the`IgxColumnComponent`.
2463-
* @example
2464-
* ```html
2465-
* <igx-grid [pinnedColumnsText]="'PinnedCols Text" [data]="data" [width]="'100%'" [height]="'500px'"></igx-grid>
2466-
* ```
2467-
*/
2468-
@DeprecateProperty('`pinnedColumnsText` is deprecated')
2469-
@Input()
2470-
public get pinnedColumnsText() {
2471-
return this._pinnedColumnsText;
2472-
}
2473-
public set pinnedColumnsText(value) {
2474-
this._pinnedColumnsText = value;
2475-
this.notifyChanges();
2476-
}
2477-
24782341
/**
24792342
* Gets/Sets whether the grid has batch editing enabled.
24802343
* When batch editing is enabled, changes are not made directly to the underlying data.
@@ -2500,11 +2363,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
25002363
}
25012364
}
25022365

2503-
/** @hidden @internal */
2504-
public get pinnedColumnsTextInternal() {
2505-
return this._pinnedColumnsText;
2506-
}
2507-
25082366
/**
25092367
* Get transactions service for the grid.
25102368
*/
@@ -2535,47 +2393,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
25352393
return this._currencyPositionLeft = i < 1;
25362394
}
25372395

2538-
2539-
/**
2540-
* Gets/Sets whether the toolbar is shown.
2541-
*
2542-
* @deprecated
2543-
*
2544-
* @example
2545-
* ```html
2546-
* <igx-grid [data]="localData" [showToolbar]="true" [autoGenerate]="true" ></igx-grid>
2547-
* ```
2548-
*/
2549-
@DeprecateProperty('`showToolbar` is deprecated')
2550-
@Input()
2551-
public get showToolbar(): boolean {
2552-
return this._showToolbar;
2553-
}
2554-
public set showToolbar(newValue: boolean) {
2555-
this._showToolbar = newValue;
2556-
}
2557-
2558-
/**
2559-
* Gets/Sets the toolbar's title.
2560-
*
2561-
* @deprecated
2562-
*
2563-
* @example
2564-
* ```html
2565-
* <igx-grid [data]="localData" [showToolbar]="true" [autoGenerate]="true" [toolbarTitle]="'My Grid'"></igx-grid>
2566-
* ```
2567-
*/
2568-
@DeprecateProperty('`toolbarTitle` is deprecated')
2569-
@Input()
2570-
public get toolbarTitle(): string {
2571-
return this._toolbarTitle;
2572-
}
2573-
2574-
public set toolbarTitle(newValue: string) {
2575-
this._toolbarTitle = newValue;
2576-
this.notifyChanges();
2577-
}
2578-
25792396
/**
25802397
* Gets/Sets whether exporting to MS Excel is enabled or disabled.
25812398
*
@@ -2973,14 +2790,10 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
29732790
return this.verticalScrollContainer.getScrollNativeSize();
29742791
}
29752792

2976-
private _columnPinningTitle: string;
2977-
private _columnHidingTitle: string;
29782793

29792794
/* Toolbar related definitions */
2980-
private _showToolbar = false;
29812795
private _exportExcel = false;
29822796
private _exportCsv = false;
2983-
private _toolbarTitle: string = null;
29842797
private _exportText: string;
29852798
private _exportExcelText: string;
29862799
private _exportCsvText: string;
@@ -3017,8 +2830,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
30172830

30182831
private columnListDiffer;
30192832
private rowListDiffer;
3020-
private _hiddenColumnsText = '';
3021-
private _pinnedColumnsText = '';
30222833
private _height: string | null = '100%';
30232834
private _width: string | null = '100%';
30242835
private _rowHeight;

0 commit comments

Comments
 (0)