Skip to content

Commit

Permalink
fix(dropdown): opened dropdown must be closed when you open another d…
Browse files Browse the repository at this point in the history
…ropdown

Opened dropdown must be closed when you open another dropdown.
  • Loading branch information
naira.misakyan committed Feb 14, 2024
1 parent 1d3aa2c commit 153dd31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/molecules/ExtendedInput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const ExtendedInput = forwardRef((props, ref) => {
if (isDropdown) {
onClick(e);
if (!readOnly) {
stopEvent(e, true);
e.preventDefault();
focused ? inputRef.current.blur() : inputRef.current.focus();
}
}
Expand Down Expand Up @@ -257,7 +257,7 @@ const ExtendedInput = forwardRef((props, ref) => {
);

return (
<Tooltip position="bottom" title={showTooltip ? errorText || tooltipText : ''}>
<Tooltip position="bottom" title={tooltipText && isValid ? tooltipText : ''}>
<div
className={classnames(
'input-holder',
Expand Down
1 change: 1 addition & 0 deletions stories/organisms/Dropdown/Dropdown.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export default {
};

const Template = ({ ...args }) => <DropdownComponent {...args} />;

export const Default = Template.bind({});

export const Multiselect = Template.bind({});
Expand Down

0 comments on commit 153dd31

Please sign in to comment.