brutusin / brutusin/json-forms

CleanData after onChange between oneOf

Open
#129 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
618
Forks
171
PR merge metrics
No merged PRs in 30d

Description

When you select one of the list from the oneOf and move to un-select, the value is still saved in the container.

For example, select [An object] from the oneOf example and than select [].
When you getData(), the values are still stored in the container.

This kind of situation will mismatch the two function validate() and getData()
For example select [A multiple of 3] and fill with number 10.
The getData() will get the value 10 and the validate() will show error.

However, when you select [] and repeat the two function,
getData() will get the value 10 and validata() will show success.

http://brutusin.org/json-forms/#7

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the oneOf example at http://brutusin.org/json-forms/#7 and reproduce the sequence of selecting an option, entering a value, and then selecting []. Compare getData() with validate() after the onChange event; done means deselecting an option removes its stored value and the two functions remain consistent.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.