Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework how error tracking is done #48

Open
MangelMaxime opened this issue Mar 5, 2024 · 0 comments
Open

Rework how error tracking is done #48

MangelMaxime opened this issue Mar 5, 2024 · 0 comments

Comments

@MangelMaxime
Copy link
Owner

Currently Fable form is using the label of the field to keep track of their errors.

But I am not sure if this is the correct ways of doing it, I feel like we should explicitly ask the user for a unique ID and then have it provide the label of the field.

For example, this cause problem is you change how the checkbox is defined to accept either a string or a ReactElement for its "label"

type Attributres =
	| Text of string
	| ReactElement of ReactElement

Then in the case of ReactElement we don't have the needed information to store the key of the field error. We need to change it to ReactElement of string * ReactElement.

This could be seen as a specific but I think it just shows that we have a wrong design in the current way we consider the forms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant