How to use the idom.event function in idom

To help you get started, we’ve selected a few idom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rmorshea / idom / tests / test_widgets / test_utils.py View on Github external
        @idom.event
        async def on_click(event):
            count.value += 1
            mount(idom.html.div, {"id": f"hotswap-{count.value}"}, count.value)
github rmorshea / idom / tests / test_widgets / test_jupyter.py View on Github external
        @idom.event
        async def on_click(event):
            clicked.set(True)
github rmorshea / idom / tests / test_core / test_element.py View on Github external
        @idom.event(prevent_default=True)
        async def on_key_down(value):
            pass
github rmorshea / idom / tests / test_core / test_render.py View on Github external
        @idom.event(target_id=target_id)
        async def an_event():
            self.update()
github rmorshea / idom / tests / test_server / test_sanic / test_shared_state_client.py View on Github external
        @idom.event
        async def incr_on_click(event):
            self.update(count + 1)
github rmorshea / idom / docs / source / widgets / drag_and_drop.py View on Github external
    @idom.event(prevent_default=True, stop_propagation=True)
    async def on_hover(event):
        if not hovered:
            set_hovered(True)