ui5-typescript
ui5-typescript copied to clipboard
selectedItem property of Select$ChangeEventParameters should not be optional
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.
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.