Skip to content

Commit

Permalink
Merge pull request #75 from Brightscout/MI-2931
Browse files Browse the repository at this point in the history
[MI-2931]: Fix option list on open and update version
  • Loading branch information
SaurabhSharma-884 authored Mar 25, 2023
2 parents c3a692e + d3a9162 commit 528b290
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brightscout/mattermost-ui-library",
"version": "2.0.5",
"version": "2.0.7",
"author": {
"name": "Brightscout, Inc."
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Input/Input.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>((props, ref) => {
<StyledIconButton onClick={onClose}>
<Icon
name='Close'
size={12}
size={14}
iconColor='#ffffff'
/>
</StyledIconButton>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Input/Input.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,16 @@ export const StyledInput = styled(Form.Control)(({error}) => ({
// Style for close icon button
export const StyledIconButton = styled(Button)({
borderRadius: '50%',
padding: 2,
padding: 0,
borderWidth: 0,

'&.btn.btn-primary': {
'&, &:hover, &:active, &:focus': {
background: colors.centerChannel_64,
},
},

'& svg': {
padding: 1,
},
});
3 changes: 2 additions & 1 deletion src/components/MMSearch/MMSearch.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export const MMSearch = (props: MMSearchProps) => {
* On clicking anywhere other than `input field`, the dropdown closes
*/
const onDropDownCloseHandler = (e: MouseEvent) => {
if (e.target !== inputRef.current) {
e.stopPropagation();
if (e.target instanceof HTMLElement && !inputRef.current?.contains(e.target) && e.target !== inputRef.current) {
setOpen(false);
}
};
Expand Down

0 comments on commit 528b290

Please sign in to comment.