-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly comment removal needed 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only bummer is the any
type. That part of the code being untyped could be bug prone
const domList: HTMLCalcitePickListElement | HTMLCalciteValueListElement = document.querySelector( | ||
`calcite-${type}-list` | ||
); | ||
return domList.getSelectedItems().then((result) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: can you use await
to reduce promise nesting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the idea of marking truly optional props (prop: <type> | undefined
) across all components. Ionic components do this already (example). Should the following props also be updated?
pick-list-item
| value-list-item
textLabel
required?icon
optional?
It is worth noting that the union type fix is a side-effect and should not be used as a solution for union type errors going forward.
Related Issue: #551
Summary
selectSiblings
selectSiblings
for deselect and added a flag for adding/removing since most of hte logic is shared for both cases. Didn't rename, but let me know if you have a new suggested function name.