Blazor components should work within EditForm
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 39
- Forks
- 14
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 13
Description
🐛 Bug Report
Our Blazor components currently throw an error when used inside an EditForm element.
🤔 Expected Behavior
Some attributes of a good integration:
- Edit Form Modeling
- Nimble Controls should be able to exist in an edit form context and opt-in to edit form modeling (i.e. leverage bind-value) (similar to how in Angular controls only opt-in to Angular Forms by opting into using ngModel)
- Nimble controls should be able to exist in an edit form context without participating in edit form modeling, i.e. they are used to implement auxiliary UI that is not part of the form modeling
- Edit Form Error Reporting
- Nimble Controls should be able to exist in an edit form context and opt-in to ErrorMessage integration on nimble error-text (similar to how in angular users can opt-in to bind error-text to Angular Form error states)
- NimbleControls should be able to exist in Edit Form Context and opt-in to Edit Form Modelling without opting into ErrorMessage integration, i.e. can opt to use ValidationMessage separately instead.
😯 Current Behavior
- A Nimble control in an edit form always participates in the edit form modeling and throws an error if you do not use bind-value, see discussion below: https://github.com/ni/nimble/issues/766#issuecomment-1478412090
- A nimble control in an edit form does not have a way to opt-in to form ErrorMessage states reporting on control error-text and a user must use custom ValidationMessages, see discussion: https://github.com/ni/nimble/pull/1141#discussion_r1163751768
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Blazor components' behavior inside EditForm described in issue #766, then read the linked comment and the discussion in pull request #1141. Clarify the intended opt-in rules for form modeling and error-text integration before identifying the affected component entry points and tests; done means both use cases work without the current error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100