PM-14429 Set the min and max range of the slider to match the restrictions not update the min with the computed min. (#4305)

This commit is contained in:
Dave Severns 2024-11-14 15:36:01 -05:00 committed by GitHub
parent 3c4ac8b01a
commit 13210343db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -455,8 +455,12 @@ private fun ColumnScope.PasswordTypeContent(
BitwardenSlider(
value = passwordTypeState.length,
onValueChange = passwordHandlers.onPasswordSliderLengthChange,
range = passwordTypeState.computedMinimumLength..passwordTypeState.maxLength,
onValueChange = { newValue, isUserInteracting ->
if (newValue >= passwordTypeState.computedMinimumLength) {
passwordHandlers.onPasswordSliderLengthChange(newValue, isUserInteracting)
}
},
range = passwordTypeState.minLength..passwordTypeState.maxLength,
sliderTag = "PasswordLengthSlider",
valueTag = "PasswordLengthLabel",
modifier = Modifier