Skip to content

Stepper with negative values and trend=true #48

Answered by barvian
lumpinif asked this question in Help
Discussion options

You must be logged in to vote

I just pushed an update which should simplify this. You can now add the prop:

<NumberFlow
  trend={(oldValue, value) => Math.sign(Math.abs(value) - Math.abs(oldValue))}
/>

to get this behavior.

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@lumpinif
Comment options

Comment options

You must be logged in to vote
4 replies
@lumpinif
Comment options

@lumpinif
Comment options

@barvian
Comment options

@lumpinif
Comment options

Answer selected by lumpinif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #47 on October 23, 2024 15:35.