b-form-spinbutton update max value #6596
Unanswered
Joe-Westra
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Here's an example of what you're trying to achieve. (to my understanding) The above uses two computed properties to calculate the current sum and how much is remaining based on the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a grid of
b-form-spinbutton
's with an initial min = 0 and max = 1 (step of .01). I want the sum of all spinbuttons to be a max of 1.The hierarchy looks like this:
the
<b-form-spinbutton>
has an@change
listener that emits the difference in value on each change.The listens for these events can saves 1 - into
computedMaxVal
which is used as a prop for the . I have put awatch
on that prop in the PercentagePicker and can see that the logic is working well, however when setting the<b-form-inputspinner max:computedMaxValue>
the max on the spinner doesn't change dynamically. The goal is to remove the users ability to set the sum of the b-form-spinbuttons to more than 1 (or less than 0)I imagine that I can either:
OR
Are there better options? (ie. re-create the inputbutton with a max value on change and the place focus on it?)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions