Skip to content

Commit

Permalink
Merge branch 'master' into fix/single-select-option-filter-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gmukul01 authored Jul 5, 2023
2 parents 3ee9839 + 9c564f0 commit b49d8ab
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 201 deletions.
11 changes: 11 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [6.27.1](https://github.com/medly/medly-components/compare/@medly-components/[email protected]...@medly-components/[email protected]) (2023-07-01)


### Bug Fixes

* **core:** searchBox: clear/close icon not hiding when we manually clear the state value. ([#731](https://github.com/medly/medly-components/issues/731)) ([94a0227](https://github.com/medly/medly-components/commit/94a02279cb2cdd34face51ce0ebc0382b39025c0)), closes [#730](https://github.com/medly/medly-components/issues/730)





# [6.27.0](https://github.com/medly/medly-components/compare/@medly-components/[email protected]...@medly-components/[email protected]) (2023-06-16)


Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@medly-components/core",
"version": "6.27.0",
"version": "6.27.1",
"sideEffects": false,
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
Expand Down
8 changes: 7 additions & 1 deletion packages/core/src/components/SearchBox/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const Component: FC<SearchBoxProps> = memo(
maxWidth,
isLoading,
loader: customLoader,
value,
...restProps
} = props;
const wrapperRef = useRef<any>(null),
Expand All @@ -39,7 +40,7 @@ const Component: FC<SearchBoxProps> = memo(
[areOptionsVisible, setOptionsVisibilityState] = useState(false),
[options, setOptions] = useState<Option[]>(defaultOptions || []),
[isCustomSearchActive, setIsCustomSearchActive] = useState(false),
[showCloseIcon, setShowCloseIcon] = useState(!!restProps?.value?.toString().length),
[showCloseIcon, setShowCloseIcon] = useState(!!value?.toString().length),
isEnterKeyPress = useKeyPress('Enter', true, optionsRef);

useEffect(() => {
Expand Down Expand Up @@ -129,6 +130,10 @@ const Component: FC<SearchBoxProps> = memo(
}
}, [isEnterKeyPress]);

useEffect(() => {
setShowCloseIcon(!!value?.toString().length);
}, [value]);

const hasCustomSearchFilter = !!customSearchFilter;

return (
Expand All @@ -148,6 +153,7 @@ const Component: FC<SearchBoxProps> = memo(
ref={inputRef}
onFocus={handleFocus}
onBlur={handleBlur}
value={value}
{...restProps}
/>
{showCloseIcon && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ exports[`SearchBox options should render options when user search option specifi
<input
class="c1"
placeholder="search"
value=""
/>
<span
class="c2"
Expand Down Expand Up @@ -652,6 +653,7 @@ exports[`SearchBox should render properly with "M" size 1`] = `
<input
class="c1"
placeholder="Search"
value=""
/>
<span
class="c2 c3"
Expand Down Expand Up @@ -887,6 +889,7 @@ exports[`SearchBox should render properly with "S" size 1`] = `
<input
class="c1"
placeholder="Search"
value=""
/>
<span
class="c2 c3"
Expand Down
8 changes: 8 additions & 0 deletions packages/forms/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.2.12](https://github.com/medly/medly-components/compare/@medly-components/[email protected]...@medly-components/[email protected]) (2023-07-01)

**Note:** Version bump only for package @medly-components/forms





## [2.2.11](https://github.com/medly/medly-components/compare/@medly-components/[email protected]...@medly-components/[email protected]) (2023-06-16)

**Note:** Version bump only for package @medly-components/forms
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@medly-components/forms",
"version": "2.2.11",
"version": "2.2.12",
"sideEffects": false,
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
Expand Down Expand Up @@ -29,7 +29,7 @@
"styled-components": "^5.1.0"
},
"dependencies": {
"@medly-components/core": "6.27.0",
"@medly-components/core": "6.27.1",
"@medly-components/theme": "5.2.1",
"@medly-components/utils": "3.1.1",
"date-fns": "^2.16.1",
Expand Down
8 changes: 8 additions & 0 deletions packages/layout/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [3.2.48](https://github.com/medly/medly-components/compare/@medly-components/[email protected]...@medly-components/[email protected]) (2023-07-01)

**Note:** Version bump only for package @medly-components/layout





## [3.2.47](https://github.com/medly/medly-components/compare/@medly-components/[email protected]...@medly-components/[email protected]) (2023-06-16)

**Note:** Version bump only for package @medly-components/layout
Expand Down
4 changes: 2 additions & 2 deletions packages/layout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@medly-components/layout",
"version": "3.2.47",
"version": "3.2.48",
"sideEffects": false,
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
Expand Down Expand Up @@ -29,7 +29,7 @@
"styled-components": "^5.1.0"
},
"dependencies": {
"@medly-components/core": "6.27.0",
"@medly-components/core": "6.27.1",
"@medly-components/icons": "1.12.15",
"@medly-components/theme": "5.2.1",
"@medly-components/utils": "3.1.1"
Expand Down
Loading

0 comments on commit b49d8ab

Please sign in to comment.