Skip to content

Commit

Permalink
MenuItem: extend MenuBasePlainItem to support any string indexed prop…
Browse files Browse the repository at this point in the history
…erties (#28610)
  • Loading branch information
anna-shakhova authored Dec 23, 2024
1 parent e96787e commit 90626e0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export class ContextMenuView extends modules.View {
}
},
onItemClick(params) {
// @ts-expect-error
params.itemData?.onItemClick?.(params);
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import PlainEditStrategy from '@ts/ui/collection/m_collection_widget.edit.strate

class MenuBaseEditStrategy extends PlainEditStrategy {
_getPlainItems(): Item {
// @ts-expect-error
return map(this._collectionWidget.option('items'), function getMenuItems(item) {
return item.items ? [item].concat(map(item.items, getMenuItems)) : item;
});
Expand Down
2 changes: 2 additions & 0 deletions packages/devextreme/js/ui/menu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ export interface MenuBasePlainItem extends CollectionWidgetItem {
* @public
*/
visible?: boolean;

[key: string]: any;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions packages/devextreme/ts/dx.all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21267,6 +21267,8 @@ declare module DevExpress.ui {
* [descr:dxMenuBaseItem.visible]
*/
visible?: boolean;

[key: string]: any;
}
/**
* [descr:_ui_menu_OptionChangedEvent]
Expand Down

0 comments on commit 90626e0

Please sign in to comment.