Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mckinsey/vizro into ci/vizr…
Browse files Browse the repository at this point in the history
…o_ai_release_fix
  • Loading branch information
l0uden committed Nov 14, 2023
2 parents b55258f + f8c7cf9 commit 3b81590
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->

### Fixed

- Fixed `vm.Slider` and `vm.RangeSlider` to work with incorrect text input. ([#173](https://github.com/mckinsey/vizro/pull/173))

<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
3 changes: 3 additions & 0 deletions vizro-core/src/vizro/static/js/models/range_slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export function _update_range_slider_values(
trigger_id === `${self_data["id"]}_start_value` ||
trigger_id === `${self_data["id"]}_end_value`
) {
if (isNaN(start) || isNaN(end)) {
return dash_clientside.no_update;
}
[start_text_value, end_text_value] = [start, end];
} else if (trigger_id === self_data["id"]) {
[start_text_value, end_text_value] = [slider[0], slider[1]];
Expand Down
3 changes: 3 additions & 0 deletions vizro-core/src/vizro/static/js/models/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export function _update_slider_values(start, slider, input_store, self_data) {
dash_clientside.callback_context.triggered[0]["prop_id"].split(".")[0];
}
if (trigger_id === `${self_data["id"]}_text_value`) {
if (isNaN(start)) {
return dash_clientside.no_update;
}
text_value = start;
} else if (trigger_id === self_data["id"]) {
text_value = slider;
Expand Down

0 comments on commit 3b81590

Please sign in to comment.