Comments (3)
Came here to raise the same issue. For some reason the value is being removed in the backend (shown in my example by printing the value), but it remains in the front end.
from dash import callback, Dash, html, Input, Output, no_update
import dash_mantine_components as dmc
app = Dash(__name__)
app.layout = html.Div([
dmc.NumberInput(
label="Enter a number",
id="number"
),
dmc.Button(
children='clear inputs',
id='clear',
n_clicks=0
),
html.Div(
id="value"
)
])
@callback(
Output("number", "value"),
Input("clear", "n_clicks"),
)
def update_value(n_clicks):
if n_clicks == 0:
return no_update
if n_clicks > 0:
return None
@callback(
Output('value', 'children'),
Input("number", "value"),
)
def print_value(number):
return html.P(f'NumberInput Value: {number}')
if __name__ == "__main__":
app.run_server(debug=True)
from dash-mantine-components.
If you are using the latest 0.13 alpha releases, then the way to clear a number input is to set its value an empty string instead of None.
from dash-mantine-components.
Thank you @snehilvj I have installed v 0.13 and it works
from dash-mantine-components.
Related Issues (20)
- Min value of RangeSlider is None
- Data Property does not get saved for a multi page setup
- SegmentedControl: Cannot read properties of null (reading 'getBoundingClientRect')
- Theme's primaryColor is ignored
- Menu hidden when overflow HOT 1
- [BUG] `Slider` and `RangeSlider` compressed to a point when `align=center` in a `dmc.Stack`.
- DatePicker Crashes with Scaled Screen Resolution HOT 1
- Carousel support [feature request] HOT 2
- Conda forge support
- [BUG] dmc.HoverCard blocked by other components when placed in a dmc.AccordionMultiple with style={'postion': ‘fixed’} set. HOT 9
- [Request] How can I change the checkedIcon displayed on the left of dmc.Chip?
- Add a focus attribute to the Textarea element
- Checkboxes in TransferList don't work if the values in the list aren't strings
- 'required' prop on select & multiselect not working HOT 1
- Validate url to prevent XSS attacks
- Unable to set width of component to `100%` inside `Tooltip` HOT 4
- Example code for tabs and icons raises TypeError
- [Bug] Issue accessing value of maxDate for DateRangePicker and DatePicker components
- dmc.Notification broken HOT 2
- [BUG] Using notifications along with an Interval results in endless re-triggering of notifications HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dash-mantine-components.