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( BitwardenSlider(
value = passwordTypeState.length, value = passwordTypeState.length,
onValueChange = passwordHandlers.onPasswordSliderLengthChange, onValueChange = { newValue, isUserInteracting ->
range = passwordTypeState.computedMinimumLength..passwordTypeState.maxLength, if (newValue >= passwordTypeState.computedMinimumLength) {
passwordHandlers.onPasswordSliderLengthChange(newValue, isUserInteracting)
}
},
range = passwordTypeState.minLength..passwordTypeState.maxLength,
sliderTag = "PasswordLengthSlider", sliderTag = "PasswordLengthSlider",
valueTag = "PasswordLengthLabel", valueTag = "PasswordLengthLabel",
modifier = Modifier modifier = Modifier