Skip to content
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

fix: slider input default value #959

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

wusteven815
Copy link
Contributor

@wusteven815 wusteven815 commented Oct 24, 2024

@wusteven815 wusteven815 self-assigned this Oct 24, 2024
@wusteven815 wusteven815 requested review from a team and dgodinez-dh and removed request for a team October 24, 2024 17:30
@wusteven815 wusteven815 marked this pull request as ready for review October 24, 2024 17:30
Comment on lines +47 to +52
export type SerializedInputElementProps<T, V> = Omit<
T,
'defaultValue' | 'value' | 'onChange'
> & {
/** The default value of the input */
defaultValue?: string;
defaultValue?: V;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this to a generic? What other value could defaultValue and value have that is valid except for string?

Copy link
Contributor Author

@wusteven815 wusteven815 Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

number for slider and { start: number; end: number } for range slider

@wusteven815 wusteven815 merged commit 3a448ea into deephaven:main Oct 28, 2024
17 checks passed
@wusteven815 wusteven815 deleted the 754-slider-default-value branch October 30, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui.slider and ui.range_slider not updating default_value
3 participants