Skip to content

Commit 55ec5d0

Browse files
committed
chore(combo): extend IBaseEventArgs & rename searchTerm #7282
1 parent a622662 commit 55ec5d0

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
@@ -204,7 +204,7 @@ All notable changes for each version of this project will be documented in this
204204

205205
- `IgxCombo`:
206206
- Added `autoFocusSearch` input that allows to manipulate the combo's opening behavior. When the property is `true` (by default), the combo's search input is focused on open. When set to `false`, the focus goes to the combo items container, which can be used to prevent the software keyboard from activating on mobile devices when opening the combo.
207-
- 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.
207+
- 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.
208208

209209
- `IgxToast`:
210210
- Added functionality for displaying various content into the toast component. It also allows users to access toast styles through its host element.

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
@@ -98,9 +98,9 @@ export interface IComboSelectionChangeEventArgs extends CancelableEventArgs, IBa
9898
}
9999

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

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

0 commit comments

Comments
 (0)