File tree Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Original file line number Diff line number Diff line change
1
+ ## v0.8.12 - 11 Nov 2021
2
+ - Removed autohide on scroll because it had some problems with detecting scrollable parents
3
+
1
4
## v0.8.11 - 4 Nov 2021
2
5
- Removed preventing form from submitting behaviour
3
6
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @rmr/use-dropdown" ,
3
- "version" : " 0.8.11 " ,
3
+ "version" : " 0.8.12 " ,
4
4
"description" : " " ,
5
5
"main" : " ./lib/index.js" ,
6
6
"repository" : {
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import {ReducerAction} from './types/ReducerAction';
6
6
import { mergeReducers } from './utils/mergeReducers' ;
7
7
import { useEvent } from './useEvent' ;
8
8
import { findScrollContainers } from './utils/findScrollContainers' ;
9
- import { isElementInvisible } from './utils/isElementInvisible' ;
10
9
11
10
type MenuWidth = Pick < CSSStyleDeclaration , 'width' > | 'wrapper' ;
12
11
@@ -163,15 +162,6 @@ export const useDropdown = <TItem>(props: UseDropdownOptions<TItem>) => {
163
162
} , [ wrapperRef , menuRef . current ] ) ;
164
163
165
164
const setPosition = useCallback ( ( ) => {
166
- if ( wrapperRef . current ) {
167
- const parents = findScrollContainers ( wrapperRef . current ) ;
168
- const isInvisible = isElementInvisible ( wrapperRef . current , parents ) ;
169
-
170
- if ( isInvisible ) {
171
- setOpen ( false ) ;
172
- }
173
- }
174
-
175
165
if ( menuRef . current ) {
176
166
const { top, left, transform} = getPosition ( ) ;
177
167
@@ -180,7 +170,7 @@ export const useDropdown = <TItem>(props: UseDropdownOptions<TItem>) => {
180
170
menuRef . current . style . transform = transform ;
181
171
menuRef . current . style . visibility = 'visible' ;
182
172
}
183
- } , [ parents ] ) ;
173
+ } , [ ] ) ;
184
174
185
175
const handleKeyDown = useCallback ( ( ev : KeyboardEvent ) => {
186
176
switch ( ev . key ) {
You can’t perform that action at this time.
0 commit comments