reactstrap
reactstrap copied to clipboard
DropdownToggle aria-haspopup should accept string value
- components:
DropdownToggle - reactstrap version
#8.5.1 - react version
#16.13.1 - bootstrap version
#4.5.2 - typescript version
#3.9.7 - @types/react version
#16.9.49 - @types/reactstrap version
#8.5.1
What is happening?
I'm using typescript and when I try to set a string value (listbox) to aria-haspopup prop I got this error:
Warning: Failed prop type: Invalid prop `aria-haspopup` of type `string` supplied to `DropdownToggle`, expected `boolean`.
I know this is related to the typings library (@types/reactstrap) but the prop types of DropdownToggle has wrong typing as well:
#reactstrap/src/DropdownToggle.js
...
const propTypes = {
...
'aria-haspopup': PropTypes.bool,
...
};
What should be happening?
aria-haspopup prop should accept string value according to the spec https://www.w3.org/TR/wai-aria/#aria-haspopup
Hi! I'd like to take a stab at this. I've forked the repo and I'm gonna start working on it today.
okay! I just PR'd thanks so much for any feedback!
Fixed in #2077