pablo-abc / felte

An extensible form library for Svelte, Solid and React
https://felte.dev
MIT License
1.02k stars 44 forks source link

To -Infinity and Beyond #239

Open timothyallan opened 1 year ago

timothyallan commented 1 year ago

Describe the bug

In SolidJS, trying to setFields to Infinity/-Infinity, or even the string values of them causes a The specified value "-Infinity" cannot be parsed, or is out of range. warning from setControlValue in domUtils and the field is never set.

Which package/s are you using?

@felte/solid (SolidJS)

Environment

To reproduce

do a

setFields('myControl', -Infinity) 
or
setFields('myControl', `${-Infinity}`)`

Small reproduction example

No response

Screenshots

No response

Additional context

No response

pablo-abc commented 1 year ago

Can you give me some more context? What type of input are you trying to assign a value of Infinity to? number?

timothyallan commented 1 year ago

Sure, it's being used for a 3d boundary/camera system. Most numbers, as well as Infinity/-Infinity are all valid values for the bounds, as well as various other 3d properties. So you can have a vector that is {x:3.14, y:10000, z:Infinity}