Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to the TypeaheadSelect template (#11153)
* Avoid "any" type in TypeaheadSelect template * Don't show "Clear" button without onClearSelection function If there is no such function, nothing will change when clicking that button, and it is less confusing to not show it in that case. * Fix TypeScript error in TypeaheadSelect This one: # pkg/lib/cockpit-components-typeahead-select.tsx:406:6 - error TS2375: Type '{ children: Element; className?: string; isExpanded: boolean; isDisabled: boolean | undefined; isFullHeight?: boolean; isFullWidth: boolean; splitButtonOptions?: SplitButtonOptions; ... 281 more ...; ref: Ref<...>; }' is not assignable to type 'MenuToggleProps' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties. # Types of property 'isDisabled' are incompatible. # Type 'boolean | undefined' is not assignable to type 'boolean'. # Type 'undefined' is not assignable to type 'boolean'.
- Loading branch information