dash-mantine-components
dash-mantine-components copied to clipboard
Pressing numpad enter to validate selection on dmc.Select
We cannot press numpad enter to validate selection on dmc.Select, that kind of painful for users when your selection is mainly a list of numbers. I am not a expert in TypeScript but I don't think it's will be hard to fix. So if someone can do it it would be a nice feature, else close this issue and I will try to do it by myself and add it with a PR.
Thanks for reading.
I cannot reproduce this issue on my end. I tried it on a Mac and a windows machine. Can you please share an MRE I can use?
Do you see this issue with the Select Menu on the top right of dmc documentation?

I don't have this issues with the docs's dmc.Select component. But on this MRE, I have this issues once again :
from dash import Dash, html
import dash_mantine_components as dmc
from flask import Flask
server = Flask(__name__)
app = Dash(__name__, server=server, prevent_initial_callbacks=True)
app.title = "MRE"
input_bar = dmc.Stack(
children=[
dmc.Select(id="wellnameinput", placeholder="Enter Well Name:", rightSection=[
], data=["A", "B", "C"], searchable=True, style={"width": "200", "color": "#FFFFFF"},)
], style={"position": "relative", "top": "20px", "display": "flex", "flexDirection": "row", "boxAlign": "stretch", "alignItems": "flex-end", "fontFamily": "Roboto,Helvetica,Arial,sans-serif", "marginBottom": "30px"}
)
app.layout = dmc.NotificationsProvider([html.Div([
dmc.Container([
html.Div(
[
html.Div([
input_bar
])])
]),
]),
])
if __name__ == '__main__':
app.run_server(host="0.0.0.0")
Thanks for you answers Edit : -I have this bug on several browser -I use 0.10.X version of dmc
Edit 2 : I try to add something like :
document.getElementById("wellnameinput").onkeydown = function(event) {
if (event.key === 'NumpadEnter' || event.key === 'Enter') {
document.getElementById("wellnameinput").blur();
}
};
But the problem is still here. Edit 3: I tested this code on 2 others computers and there is still a problem.
bump/I still got the issue.