mxcube / mxcubeweb

MXCuBE-Web
http://mxcube.github.io/mxcubeweb/
GNU Lesser General Public License v3.0
20 stars 37 forks source link

UI: make sure looked up HO values are numbers #1233

Closed elmjag closed 1 month ago

elmjag commented 1 month ago

The values returned by toFixed() are used to pre-fill task dialog's common fields. Fields such as resolution, energy, etc. The dialog's schema for these parameters specify that these fields must be of a number types. When we pre-fill these fields as text string, the dialog will show errors such as:

'Energy' must be a number

Note, this error will be displayed on first validation run of the dialog. That is first when user starts editing the fields.

Converting return values to number solves this problem.

Solves issue: https://github.com/mxcube/mxcubeweb/issues/1231

marcus-oscarsson commented 1 month ago

:+1: Thanks @elmjag