pnp / pnp/sp-dev-fx-controls-react

[Bug][DynamicForm] OnBeforeSubmit does not fire when using a mandatory field in the FieldOverrides

Open
#1,950 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
433
Forks
418
Avg merge
5d 6m
Merged PRs (30d)
19

Description

Category

[ ] Enhancement

[X] Bug

[ ] Question

Version

Please specify what version of the library you are using: [3.20.0]

Expected / Desired Behavior / Question

In DynamicForm, when I use fieldoverrides with a required field, onBeforeSubmit does not fire and the form is not submitted. By default the field was red (error) and when I type something it turns black and without an error message, but when I click submit nothing happens. if I update the list field as non-required, the dynamic form works fine.

Observed Behavior

In DynamicForm, when I use fieldoverrides with a required field, onBeforeSubmit does not fire and the form is not submitted.

Steps to Reproduce

By default the field was red (error) and when I type something it turns black and without an error message, but when I click submit nothing happens. if I update the list field as non-required, the dynamic form works fine.

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the DynamicForm implementation and trace validation for a required field supplied through fieldOverrides before onBeforeSubmit. Reproduce with library version 3.20.0 using a required list field, then confirm that entering a value allows submission and fires onBeforeSubmit.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.