ui5-typescript icon indicating copy to clipboard operation
ui5-typescript copied to clipboard

selectedItem property of Select$ChangeEventParameters should not be optional

Open biscimus opened this issue 2 months ago • 1 comments

Describe the bug

public async onChangeDimensionType(event: sap.m.Select$ChangeEvent) {
        const selectedItem = event.getParameter("selectedItem"); 
}

TS tells me that selectedItem might be undefined, which is wrong.

Expected behavior Should return a selected item, as defined by the UI5 API reference.

biscimus avatar Oct 29 '25 14:10 biscimus

This bothers me alot, too, as not only this interface is affected, but virtually every event parameter interfaces members are optional, even when there are always present in practice.

nkappler avatar Oct 30 '25 10:10 nkappler