score:0

well, i don't know what those tags are, but here is my guess...

the critical angle's control is marked as type="number", hence it doesn't like values which are not numeric, like the string "result" is.

instead, you could try something like this. i used a form.label tag to wrap the "result" string, but i think there's something better.

      <form.group classname="mb-4">
        <form.label>critical angle</form.label>
        {result === null
           ? (
             <form.label>result</form.label>
           ) : (
             <form.control
                type="number"
                disabled="true"
                value={result === null ? "result" : result}
             />
           )
        }
      </form.group>

i can't help more than this.


Related Query

More Query from same tag