-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implement `objetToFormEntries` functionality If we are working with more complex data structures then we have to encode those data structures into a syntax that the HTML can understand. This means that we have to use `<input type="hidden" name="..." value="...">` syntax. To convert a simple array we can use the following syntax: ```js // Assuming we have a `name` of `person` let input = ['Alice', 'Bob', 'Charlie'] ``` Results in: ```html <input type="hidden" name="person[]" value="Alice" /> <input type="hidden" name="person[]" value="Bob" /> <input type="hidden" name="person[]" value="Charlie" /> ``` Note: the additional `[]` in the name attribute. --- A more complex object (even deeply nested) can be encoded like this: ```js // Assuming we have a `name` of `person` let input = { id: 1, name: { first: 'Jane', last: 'Doe' } } ``` Results in: ```html <input type="hidden" name="person[id]" value="1" /> <input type="hidden" name="person[name][first]" value="Jane" /> <input type="hidden" name="person[name][last]" value="Doe" /> ``` * implement VisuallyHidden component * implement and export some extra helper utilities * implement form element for Switch * implement form element for Combobox * implement form element for RadioGroup * implement form element for Listbox * add combined forms example to the playground * update changelog * enable support for iterators * ensure to compile dom iterables * remove unused imports
- Loading branch information
1 parent
2414bbd
commit 7bb8987
Showing
30 changed files
with
1,953 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.