@@ -226,26 +226,29 @@ module.exports = create-class do
226
226
227
227
# (TETHERED / ANIMATED / SIMPLE) DROPDOWN
228
228
DropdownMenu {} <<< @ props <<<
229
-
230
229
ref : \dropdownMenu
231
-
232
230
class-name : class-name-from-object do
233
231
\react-selectize : 1
234
232
" #{ @ props .class-name } " : 1
235
-
236
233
theme : @ props .theme
237
234
238
- # on-option-click :: (Eq e) => e -> ()
239
- on-option-click : (highlighted-uid ) !~>
240
- <~ @ select-highlighted-uid anchor-index
241
-
235
+ # scroll-lock is used for blocking mouse interference with highlighted uid when using the arrow keys
236
+ # to scroll through the options list
242
237
scroll-lock : @ props .scroll-lock
243
238
on-scroll-change : @ props .on-scroll-change
244
239
240
+ # used when dropdown-direction is -1
241
+ # bottom-anchor :: () -> ReactElement
242
+ bottom-anchor : ~> find-DOM-node @ refs .control
243
+
245
244
# used when @props.tether is true
246
245
# tether-target :: () -> ReactElement
247
246
tether-target : ~> find-DOM-node @ refs .control
248
247
248
+ # on-option-click :: (Eq e) => e -> ()
249
+ on-option-click : (highlighted-uid ) !~>
250
+ <~ @ select-highlighted-uid anchor-index
251
+
249
252
250
253
# handle-keydown :: ComputedState -> Event -> Boolean
251
254
handle-keydown : ({anchor-index }, e ) ->
@@ -393,11 +396,6 @@ module.exports = create-class do
393
396
if ! @ props .open and prev-props .open
394
397
@ props .on-highlighted-uid-change undefined
395
398
396
- # flip the dropdown if props.dropdown-direction is -1
397
- if @ refs .dropdown-menu
398
- (find-DOM-node @ refs .dropdown-menu )? .style <<<
399
- bottom : if @ props.dropdown-direction == - 1 then (find-DOM-node @ refs .control ).offset-height else " "
400
-
401
399
# component-will-receive-props :: Props -> ()
402
400
component-will-receive-props : (props ) !->
403
401
if (typeof @ props.disabled == \undefined or @ props.disabled == false ) and
0 commit comments