Skip to content

Commit

Permalink
Add dropdownKeepInContainer prop in <Select /> (#2323)
Browse files Browse the repository at this point in the history
<!--
  How to write a good PR title:
- Follow [the Conventional Commits
specification](https://www.conventionalcommits.org/en/v1.0.0/).
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

## Self Checklist

- [x] I wrote a PR title in **English** and added an appropriate
**label** to the PR.
- [x] I wrote the commit message in **English** and to follow [**the
Conventional Commits
specification**](https://www.conventionalcommits.org/en/v1.0.0/).
- [x] I [added the
**changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
about the changes that needed to be released. (or didn't have to)
- [x] I wrote or updated **documentation** related to the changes. (or
didn't have to)
- [x] I wrote or updated **tests** related to the changes. (or didn't
have to)
- [x] I tested the changes in various browsers. (or didn't have to)
  - Windows: Chrome, Edge, (Optional) Firefox
  - macOS: Chrome, Edge, Safari, (Optional) Firefox

## Related Issue

<!-- Please link to issue if one exists -->

<!-- Fixes #0000 -->

Fixes #2322 

## Summary

<!-- Please brief explanation of the changes made -->

`Select` 컴포넌트에 `OverlayProps`인 `keepInContainer` prop을 받도록 합니다.

## Details

<!-- Please elaborate description of the changes -->

### Breaking change? (Yes/No)

<!-- If Yes, please describe the impact and migration path for users -->

- No

## References

<!-- Please list any other resources or points the reviewer should be
aware of -->
  • Loading branch information
igy95 authored Jul 2, 2024
1 parent 2adf525 commit d72c262
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-laws-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@channel.io/bezier-react': minor
---

Add `dropdownKeepInContainer` prop in `Select`
2 changes: 2 additions & 0 deletions packages/bezier-react/src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const Select = forwardRef<SelectRef, SelectProps>(function Select(
dropdownMarginY = 6,
dropdownZIndex = 'overlay',
dropdownPosition = 'bottom-left',
dropdownKeepInContainer = false,
onClickTrigger,
onHideDropdown,
...rest
Expand Down Expand Up @@ -190,6 +191,7 @@ export const Select = forwardRef<SelectRef, SelectProps>(function Select(
target={triggerRef.current}
container={dropdownContainer || containerRef.current}
position={dropdownPosition}
keepInContainer={dropdownKeepInContainer}
data-testid={SELECT_DROPDOWN_TEST_ID}
onHide={handleHideDropdown}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface SelectOwnProps {
dropdownMarginY?: OverlayProps['marginY']
dropdownZIndex?: ZIndex
dropdownPosition?: OverlayProps['position']
dropdownKeepInContainer?: OverlayProps['keepInContainer']
onClickTrigger?: React.MouseEventHandler
onHideDropdown?: () => void
}
Expand Down

0 comments on commit d72c262

Please sign in to comment.