Skip to content

Commit abd5132

Browse files
mraiguoafc163
authored andcommitted
Dynamic setting max prop
1 parent 2e2fe1b commit abd5132

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default class InputNumber extends React.Component {
124124

125125
// Don't trigger in componentDidMount
126126
if (prevProps) {
127-
if (prevProps.value !== value) {
127+
if (prevProps.value !== value || prevProps.max !== max || prevProps.min !== min) {
128128
const validValue = focused ? value : this.getValidValue(value);
129129
let nextInputValue;
130130
if (this.pressingUpOrDown) {

0 commit comments

Comments
 (0)