Skip to content

Commit af45ba8

Browse files
committed
chore(combo): extend IBaseEventArgs & rename searchTerm #7282
1 parent eae84a4 commit af45ba8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ All notable changes for each version of this project will be documented in this
77
### General
88
- `igxCombo`
99
- **Behavioral Change** - Change default positioning strategy from `ConnectedPositioningStrategy` to `AutoPositionStrategy`. The [`Auto`](https://www.infragistics.com/products/ignite-ui-angular/angular/components/overlay_position.html#auto) strategy will initially try to show the element like the Connected strategy does. If the element goes out of the viewport Auto will flip the starting point and the direction, i.e. if the direction is 'bottom', it will switch it to 'top' and so on. If after flipping direction the content goes out of the view, auto strategy will revert to initial start point and direction and will push the content into the view. Note after pushing the content it may hide the combo's input.
10-
- Make `onSearchInput` event cancellable. The event args type has been changed to `IComboSearchInputEventArgs`, which have two properties: `searchTerm` - holds the change in the search input and `cancel` - indicates whether the event should be canceled.
10+
- Make `onSearchInput` event cancellable. The event args type has been changed to `IComboSearchInputEventArgs`, which have the following properties: `searchText` - holds the text typed into the search input and `cancel` - indicates whether the event should be canceled.
1111
- `IgxOverlay`
1212
- Added new property - `closeOnEsc` - in `OverlaySettings`. The overlay can now be prevented from closing, on escape keypress, by setting the property to `false`, by default it's `true`.
1313
- `igxDialog`

projects/igniteui-angular/src/lib/combo/combo.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,15 +532,15 @@ describe('igxCombo', () => {
532532
expect(combo.onSearchInput.emit).toHaveBeenCalledTimes(0);
533533

534534
const args = {
535-
searchTerm: 'Fake',
535+
searchText: 'Fake',
536536
cancel: false
537537
};
538538
combo.handleInputChange('Fake');
539539
expect(matchSpy).toHaveBeenCalledTimes(2);
540540
expect(combo.onSearchInput.emit).toHaveBeenCalledTimes(1);
541541
expect(combo.onSearchInput.emit).toHaveBeenCalledWith(args);
542542

543-
args.searchTerm = '';
543+
args.searchText = '';
544544
combo.handleInputChange('');
545545
expect(matchSpy).toHaveBeenCalledTimes(3);
546546
expect(combo.onSearchInput.emit).toHaveBeenCalledTimes(2);

projects/igniteui-angular/src/lib/combo/combo.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ export interface IComboSelectionChangeEventArgs extends CancelableEventArgs, IBa
9797
}
9898

9999
/** Event emitted when the igx-combo's search input changes */
100-
export interface IComboSearchInputEventArgs extends CancelableEventArgs {
101-
/** The change that has been made to the search input */
102-
searchTerm: string;
100+
export interface IComboSearchInputEventArgs extends CancelableEventArgs, IBaseEventArgs {
101+
/** The text that has been typed into the search input */
102+
searchText: string;
103103
}
104104

105105
export interface IComboItemAdditionEvent extends IBaseEventArgs {
@@ -988,7 +988,7 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
988988
public handleInputChange(event?: string) {
989989
if (event !== undefined) {
990990
const args: IComboSearchInputEventArgs = {
991-
searchTerm: event,
991+
searchText: event,
992992
cancel: false
993993
};
994994
this.onSearchInput.emit(args);

0 commit comments

Comments
 (0)