File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,8 @@ export default class extends Controller {
2323 connect ( ) {
2424 this . boundHandleKeydown = this . #handleKeydown. bind ( this ) ; // Bind the function so we can remove it later
2525 this . selectedIndex = - 1 ;
26- this . autoUpdateCleanup = autoUpdate (
27- this . triggerTarget ,
28- this . contentTarget ,
29- this . #computeTooltip. bind ( this ) ,
30- ) ;
26+
27+ this . #setupAutoUpdate( ) ;
3128 }
3229
3330 disconnect ( ) {
@@ -36,6 +33,14 @@ export default class extends Controller {
3633 }
3734 }
3835
36+ #setupAutoUpdate( ) {
37+ this . autoUpdateCleanup = autoUpdate (
38+ this . triggerTarget ,
39+ this . contentTarget ,
40+ this . #computeTooltip. bind ( this ) ,
41+ ) ;
42+ }
43+
3944 #computeTooltip( ) {
4045 computePosition ( this . triggerTarget , this . contentTarget , {
4146 placement : this . optionsValue . placement || "top" ,
You can’t perform that action at this time.
0 commit comments