selectedItem property of Select$ChangeEventParameters should not be optional
Open
Beginner friendly
Nobody has claimed this yet.
dts-generator
- Dominant language
- TypeScript
- Stars
- 213
- Forks
- 35
- Avg merge
- 37m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Select$ChangeEventParameters type declaration and compare its selectedItem parameter with the UI5 API reference linked in the issue. Update the type so the shown onChangeDimensionType example no longer reports selectedItem as possibly undefined, then run the repository's relevant type checks or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100