Try adding the phx-target to your button:
<button
type="button"
class="rev-Button rev-Button--secondary rev-Button--tiny"
phx-click="show_driver_availability_info"
phx-target={{ @myself }}
>See Driver Availability Info</button>
But, since this looks like a Surface component, you could do this instead:
<button
type="button"
class="rev-Button rev-Button--secondary rev-Button--tiny"
:on-click="show_driver_availability_info"
>See Driver Availability Info</button>
And Surface will add the target for yourself.
Without a target, events will reach the main liveview, which is what the error message said. See Targeting Component Events in the LiveView docs & Events section in Surface docs.


















