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
Storybook 8.4.7. i'm using the standard controls for web-components, and my target attributes are all flickr IDs, which are long 64bit sequence IDs.
When the controls 'remember' them from one reload to the other, they parse them as numbers rather than treating them as raw strings, and then somehow round them. So (for example) 72157635142840792 becomes 72157635142840800.
I don't want this. I want them treated as strings, regardless of the fact that they are all digits. Numbers should not be so corrupted. It seems this is the result of parseFloat being involved.
Is there a way I can force the controls to not automagically try to interpret them as a number and trigger parseFloat?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Storybook 8.4.7. i'm using the standard controls for web-components, and my target attributes are all flickr IDs, which are long 64bit sequence IDs.
When the controls 'remember' them from one reload to the other, they parse them as numbers rather than treating them as raw strings, and then somehow round them. So (for example) 72157635142840792 becomes 72157635142840800.
I don't want this. I want them treated as strings, regardless of the fact that they are all digits. Numbers should not be so corrupted. It seems this is the result of parseFloat being involved.
Is there a way I can force the controls to not automagically try to interpret them as a number and trigger parseFloat?
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions