Add bridge overflow menu controller.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { BridgeComponent } from "@hotwired/hotwire-native-bridge"
|
||||
|
||||
export default class extends BridgeComponent {
|
||||
static component = "overflow-menu"
|
||||
|
||||
connect() {
|
||||
super.connect()
|
||||
this.notifyBridgeOfConnect()
|
||||
}
|
||||
|
||||
notifyBridgeOfConnect() {
|
||||
this.send("connect", this.bridgeElement.getButton(), () => {
|
||||
this.element.click()
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user