You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Pagination component that uses NumericInput to display the current page number. My intention is to let users manually input their target page number to navigate directly to it, without having to click "next page" button many times. I am using min and max props to prevent users from entering wrong page numbers using "increment/decrement" buttons. Sometimes, I only have one page to display, which means that the only valid value for the input is "1". This makes NumericInput throw an error.
Steps to reproduce
<NumericInput min={1} max={1} />
Actual behavior
Component throws an error "Error: [Blueprint] requires min to be strictly less than max if both are defined." and is not rendered.
Expected behavior
Component is rendered and allows min and max values to be equal.
Possible solutions
Remove the restriction from NumericInput by allowing min to be equal to max.
Document the restriction and provide recommended workaround for cases like mine.
The text was updated successfully, but these errors were encountered:
Environment
@blueprintjs/core: 3.10.0
Firefox 64.0.2, MacOS
Context
I have a Pagination component that uses
NumericInput
to display the current page number. My intention is to let users manually input their target page number to navigate directly to it, without having to click "next page" button many times. I am usingmin
andmax
props to prevent users from entering wrong page numbers using "increment/decrement" buttons. Sometimes, I only have one page to display, which means that the only valid value for the input is "1". This makes NumericInput throw an error.Steps to reproduce
<NumericInput min={1} max={1} />
Actual behavior
Component throws an error "Error: [Blueprint] requires min to be strictly less than max if both are defined." and is not rendered.
Expected behavior
Component is rendered and allows
min
andmax
values to be equal.Possible solutions
min
to be equal tomax
.The text was updated successfully, but these errors were encountered: