-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add missing props from issue 428 #440
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TagsInput sample app: Demos import dash_mantine_components as dmc
from dash import Dash, _dash_renderer, Input, Output, State, callback, html
_dash_renderer._set_react_version("18.2.0")
app = Dash(external_stylesheets=dmc.styles.ALL)
component = html.Div(
[
dmc.Text(id="tags-input-value"),
dmc.TagsInput(
label="Select frameworks",
placeholder="Select all you like!",
id="framework-tags-input",
value=["ng", "vue"],
acceptValueOnBlur=False,
w=400,
mb=10,
),
]
)
@callback(
Output("tags-input-value", "children"), Input("framework-tags-input", "value")
)
def select_value(value):
return ", ".join(value)
app.layout = dmc.MantineProvider(
component
)
if __name__ == "__main__":
app.run(debug=True) |
AnnMarieW
changed the title
add acceptValueOnBlur to TagsInput
add missing props from issue 428
Dec 2, 2024
Avatar - colors auto-generated based on initials when import dash_mantine_components as dmc
from dash import Dash, _dash_renderer, Input, Output, State
_dash_renderer._set_react_version("18.2.0")
app = Dash(external_stylesheets=dmc.styles.ALL)
names = [
"John Doe",
"Jane Mol",
"Alex Lump",
"Sarah Condor",
"Mike Johnson",
"Kate Kok",
"Tom Smith",
]
avatars = [dmc.Avatar(name=name, color="initials") for name in names]
component = dmc.Group(avatars)
app.layout = dmc.MantineProvider(
component
)
if __name__ == "__main__":
app.run(debug=True) |
Disabled NumberInput import dash_mantine_components as dmc
from dash import Dash, _dash_renderer, Input, Output, State
_dash_renderer._set_react_version("18.2.0")
app = Dash(external_stylesheets=dmc.styles.ALL)
component = dmc.NumberInput(disabled=True, label="Disabled input", placeholder="Disabled input", p="lg"),
app.layout = dmc.MantineProvider(
component
)
if __name__ == "__main__":
app.run(debug=True) |
Generated link: snehilvj/dash-mantine-components-440 |
alexcjohnson
reviewed
Dec 2, 2024
alexcjohnson
reviewed
Dec 2, 2024
alexcjohnson
reviewed
Dec 2, 2024
Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Alex Johnson <[email protected]>
alexcjohnson
approved these changes
Dec 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#428
acceptValueOnBlur
to TagsInput.gradient
toLineChart
hideWithOnePage
toPagination
name
toAvatar
disabled
toNumberInput
Notes
withKeyboardEvents
prop but it had no effect, the up/down arrows still worked. I'll leave that open for now in Add missing props #428, but it may not be necessary to add since it's possible to not display the arrow keys, and/or disable the input field.