microsoft / fast

The adaptive interface system for modern web experiences.
https://www.fast.design
Other
9.28k stars 594 forks source link

Fix: Exponential Notation in NumberField #6868

Closed rizwan3d closed 4 months ago

rizwan3d commented 11 months ago

The number field cautiously accepts multiple instances of "e," whereas the number system only permits a single occurrence of the same.

🎫 Issues

#6251

📑 Test Plan

11e1111 -> 11e1111 11e+1111 -> 11e+1111 11e-1111 -> 11e-1111 11e11.11 -> 11e1111 11e+11.11 -> 11e+1111 11e-11.11 -> 11e-1111 11e11e -> 11e11 11e111e1e1e1e1e1 -> 11e11111111 e -> empty 11e -> 11 e11 -> 0e11

✅ Checklist

General

Component-specific

radium-v commented 11 months ago

I'd like to see a solution that allows for typing an exponential number as well - this only allows for programmatic insertion or copy-pasting into the field.

rizwan3d commented 11 months ago

@rad

I'd like to see a solution that allows for typing an exponential number as well - this only allows for programmatic insertion or copy-pasting into the field.

Updated, can you please review it.

janechu commented 4 months ago

Unfortunately, as part of #6951 we are closing out all outstanding foundation PRs and I believe this one was on hold due to the potential issues with using regex in this situation so it will be closed for now, I would suggest creating a custom element with this capability.