flowbite-react
flowbite-react copied to clipboard
Dropdown: "disabled" attribute does not work when "renderTrigger"
- [x ] I have searched the Issues to see if this bug has already been reported
- [ x] I have tested the latest version
Steps to reproduce
I would want to have a custom span button, with dropdown attached.
Try this code:
return (
<Dropdown label="Dropdown button" disabled={true} renderTrigger={() =>
<span>[Custom Button]</span>
}>
<Dropdown.Item>Dashboard</Dropdown.Item>
<Dropdown.Item>Settings</Dropdown.Item>
<Dropdown.Item>Earnings</Dropdown.Item>
<Dropdown.Item>Sign out</Dropdown.Item>
</Dropdown>
);
Current behavior
In case disabled = {true}, the dropdown still appears when clicking.
Expected behavior
In case disabled = {true}, the dropdown should not appear.
Context
Same for me.
disabled={true} only works when not using renderTrigger