Reset slider bar based on dynamic max value

I’m making a calculator that allows for customization of three variables:

  • Amount
  • Term
  • Commission

Based on the term (months) and commission (%) selected, the ‘max amount’ can move up or down. I have the calculations in place the handle this logic well, but my app gets into an error state when I select an amount BEFORE changing term and/or commission in a way that brings ‘max amount’ below what is selected. Here’s an image of this state:


If I do not select an amount and first change term and/or commission, the slider resets as expected to the new ‘max amount’. Any thoughts on how to reset the slider in this scenario?

To add some additional color on the image shared in this post, the “Selected Funding Amount” field is populated by moving the slider. This feels a bit like a bug, but hoping someone can tell me otherwise. Thanks!

This topic was automatically closed after 70 days. New replies are no longer allowed.