emilhe / dash-extensions

The dash-extensions package is a collection of utility functions, syntax extensions, and Dash components that aim to improve the Dash development experience
https://www.dash-extensions.com/
MIT License
414 stars 58 forks source link

`de.Keyboard(dbc.Input(...), ...)` doesn't appear to work for Dash Bootstrap Compontents #341

Open DeflateAwning opened 1 month ago

DeflateAwning commented 1 month ago

Based on the suggestion for tracking an "Enter" keypress to submit a form, the following code supposedly works with dash-mantine-compenents, but doesn't work for me with dash-bootstrap-components.

Recommended Code (Mantine)

The following code supposedly works (from the link above):

de.Keyboard(
    dmc.TextInput(
        id="message",
    ),
    captureKeys=["Enter"],
    id="enter-key-listener",
)

Not Working Code (Bootstrap)

import dash_bootstrap_compontents as dbc

de.Keyboard(
    dbc.Input(
        id="message",
    ),
    captureKeys=["Enter"],
    id="enter-key-listener",
)

Resulting Behaviour