Skip to content

Commit

Permalink
feat(core/dropdown-item): mark dropdown-item as internal event (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux authored Sep 14, 2023
1 parent a61701e commit b9d4804
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 35 deletions.
5 changes: 4 additions & 1 deletion BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## v2.0.0

### `ix-dropdown-item` remove 'itemClick' event

Remove `itemClick` event use native `click` event instead.

### `ix-event-list-item` remove deprecated props

Remove deprecated props
Expand All @@ -20,7 +24,6 @@ Remove deprecated events

- `close`


### Change `itemSelectionChange` event from `ix-select`

Change type of CustomEvent to:
Expand Down
8 changes: 1 addition & 7 deletions packages/angular/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -673,17 +673,11 @@ export class IxDropdownItem {
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['itemClick']);
}
}


export declare interface IxDropdownItem extends Components.IxDropdownItem {
/**
* Click on item
*/
itemClick: EventEmitter<CustomEvent<HTMLIxDropdownItemElement>>;
}
export declare interface IxDropdownItem extends Components.IxDropdownItem {}


@ProxyCmp({
Expand Down
12 changes: 1 addition & 11 deletions packages/core/component-doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3878,17 +3878,7 @@
"docsTags": []
}
],
"events": [
{
"event": "itemClick",
"detail": "HTMLIxDropdownItemElement",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": "Click on item",
"docsTags": []
}
],
"events": [],
"styles": [],
"slots": [],
"parts": [],
Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3868,9 +3868,6 @@ declare namespace LocalJSX {
* Label of dropdown item
*/
"label"?: string;
/**
* Click on item
*/
"onItemClick"?: (event: IxDropdownItemCustomEvent<HTMLIxDropdownItemElement>) => void;
"suppressChecked"?: boolean;
}
Expand Down
12 changes: 3 additions & 9 deletions packages/core/src/components/dropdown-item/dropdown-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,13 @@ export class DropdownItem {
*/
@Prop() checked = false;

/**
* @internal
*/
/** @internal */
@Prop() isSubMenu = false;

/**
* @internal
*/
/** @internal */
@Prop() suppressChecked = false;

/**
* Click on item
*/
/** @internal */
@Event() itemClick: EventEmitter<HTMLIxDropdownItemElement>;

/**
Expand Down
4 changes: 0 additions & 4 deletions packages/documentation/docs/controls/dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,3 @@ frameworks={{
### Props

<ItemProps />

### Events

<ItemEvents />

0 comments on commit b9d4804

Please sign in to comment.