mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-25 05:02:57 +01:00
Use get reference() instead of getReference() in DropdownController
This commit is contained in:
parent
f1c4a495cc
commit
0fb80e8aa0
@ -176,7 +176,7 @@ export class DropdownController extends Controller<HTMLElement> {
|
||||
trigger: 'click',
|
||||
interactive: true,
|
||||
...(this.hasOffsetValue && { offset: this.offsetValue }),
|
||||
getReferenceClientRect: () => this.getReference().getBoundingClientRect(),
|
||||
getReferenceClientRect: () => this.reference.getBoundingClientRect(),
|
||||
theme: this.themeValue,
|
||||
plugins: this.plugins,
|
||||
onShow() {
|
||||
@ -207,7 +207,7 @@ export class DropdownController extends Controller<HTMLElement> {
|
||||
/**
|
||||
* Use a different reference element depending on the theme.
|
||||
*/
|
||||
getReference() {
|
||||
get reference() {
|
||||
const toggleParent = this.toggleTarget.parentElement as HTMLElement;
|
||||
return this.themeValue === 'dropdown-button'
|
||||
? (toggleParent.parentElement as HTMLElement)
|
||||
|
Loading…
Reference in New Issue
Block a user