Skip to content

Commit

Permalink
fix(combo): add owner to event args #7282
Browse files Browse the repository at this point in the history
  • Loading branch information
PlamenaMiteva committed Jul 16, 2020
1 parent a71a892 commit e564acb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All notable changes for each version of this project will be documented in this
### General
- `igxCombo`
- **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.
- 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.
- 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, `owner` - holds a reference to the combo component and `cancel` - indicates whether the event should be canceled.
- `IgxOverlay`
- 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`.
- `igxDialog`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ describe('igxCombo', () => {

const args = {
searchText: 'Fake',
owner: combo,
cancel: false
};
combo.handleInputChange('Fake');
Expand Down
1 change: 1 addition & 0 deletions projects/igniteui-angular/src/lib/combo/combo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,7 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
if (event !== undefined) {
const args: IComboSearchInputEventArgs = {
searchText: event,
owner: this,
cancel: false
};
this.onSearchInput.emit(args);
Expand Down

0 comments on commit e564acb

Please sign in to comment.