patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

Bug - [Slider with Input] - [should accept , as comma for non en US locales]

Open KKoukiou opened this issue 3 months ago • 1 comments

Describe the problem This is an issue with

  • [x] Patternfly 6

When using <Slider isInputVisible />, if the adjacent input is initialized with a non-English decimal separator (comma, e.g. "50,2"), the component breaks: the slider/input get out of sync and/or parsing fails. This happens even when the page/parent container has a non-EN lang (e.g. lang="el").

Affected components: Slider (with isInputVisible, value, inputValue)

How do you reproduce the problem? https://codesandbox.io/p/sandbox/3kn8jh?file=%2Findex.tsx

Expected behavior The input next to the slider should accept and display localized decimal separators in line with the container/page lang.

The slider should internally normalize user input (comma or dot) and maintain a numeric state.

Is this issue blocking you? No, I am now normalizing the input myself.

What is your product and what release date are you targeting? anaconda installer, no specific target

KKoukiou avatar Oct 13 '25 13:10 KKoukiou

@KKoukiou Just to confirm some things:

  • Is it expected that you would pass in a string like "50,2" to the inputValue prop
  • from there, PF would transform that string to a decimal number internal to the component
  • that transformed number would be what's displayed in the input as well as what's stored internally
    • Or rather, is the expectation that the input would still display the commas 50,2, and just internally the component would transform to a decimal to do any calculations, then render it back in the input with the comma again

The same confirmations above would likely apply to the slider steps as well, in terms of their value and displayed label.

Would you also be able to confirm whether this is something specific to Slider, or if there are other instances of numbers needed for input where this is a problem? Thinking namely of the NumberInput component

thatblindgeye avatar Oct 17 '25 14:10 thatblindgeye

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Dec 18 '25 11:12 github-actions[bot]