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
Please specify what version of the library you are using: [3.20.0]
Expected / Desired Behavior / Question
When navigating through editable fields in the DynamicForm, there shouldn't be any error displayed in the console for empty fields.
Observed Behavior
When going back & forth in text fields, the following error is displayed:
This is due to an attempt of using the toString() method for the newValue param which is null for some text fields (because defaultValue provided by the field structure is defined as null).
Steps to Reproduce
Add the DynamicForm in a SPFx solution
Configure it to target a list or library which have text fields without a default value defined (eg. null value, not empty string)
In the UI, click inside a text field which have a default value defined as null, then click outside to leave the text field
Resolution proposal
Maybe updating the onBlur event in the DynamicField in order to test the defaultValue if empty OR null would solve the issue. But it has to be test against other field types that are refering to this event (dropdown for example).
Another fix could be in the DynamicForm class, in the onChange event, where the newValue should be evaluated first before being converted to a string value.
The text was updated successfully, but these errors were encountered:
Category
[ ] Enhancement
[x] Bug
[ ] Question
Version
Please specify what version of the library you are using: [3.20.0]
Expected / Desired Behavior / Question
When navigating through editable fields in the DynamicForm, there shouldn't be any error displayed in the console for empty fields.
Observed Behavior
When going back & forth in text fields, the following error is displayed:
This is due to an attempt of using the
toString()
method for thenewValue
param which is null for some text fields (becausedefaultValue
provided by the field structure is defined asnull
).Steps to Reproduce
null
value, not empty string)null
, then click outside to leave the text fieldResolution proposal
Maybe updating the
onBlur
event in theDynamicField
in order to test thedefaultValue
if empty OR null would solve the issue. But it has to be test against other field types that are refering to this event (dropdown for example).Another fix could be in the
DynamicForm
class, in theonChange
event, where thenewValue
should be evaluated first before being converted to a string value.The text was updated successfully, but these errors were encountered: