Closed
Description
Category
[ ] Enhancement
[x] Bug
[ ] Question
Version
Please specify what version of the library you are using: [ 3.17 ]. It works well in [3.16]
Dynamic Form refactored a lot in 3.17
Expected / Desired Behavior / Question
Ideally when you edit an existing item with "Dynamic Form", it should not show "You can't leave this blank." error if this field already has data.
Observed Behavior
When in Edit mode (PageType=6), Dynamic Form control will always show "You can't leave this blank." error on required field even it already has existing data on current item.
Steps to Reproduce
- Choose a list which has a required field (e.g. title) and create a new item. Make sure this new created item has data on required field.
- Put "Dynamic Form" in the spfx form customization, no special settings.
<DynamicForm
context={this.props.context}
listId={this.props.context.list.guid.toString()}
listItemId={this.props.context.itemId}
onSubmitted={(listItemData: any) => {
console.log(listItemData);
setTimeout(() => {
this.props.onSave();
}, 1000);
}}
onListItemLoaded={async (listItemData: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
console.log(listItemData);
}} />