Skip to content

Commit

Permalink
Update changelog with latest changes and Form fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Sep 21, 2024
1 parent 7566b5c commit 9c9a065
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Upcoming...

* Fix an issue with top right header where icons and tooltips were not using the proper API and props
* Create script to create new theme based on Carbon
* Rename `Date` filter to `DateRange`
* Fix the fuzzy behavior of the `DateRange` filter, making it more explicit
* Fixed/changed the `getSubmittedFormData()` function's behavior: it now supports cases when you have the same `name` several times in Form data (via `<input name="...">` for instance), so that the processed data is properly converted to an array.<br>Check the `src/lib/Crud/Form.test.ts` file for more details about how it works.

# v0.17.0

- **BC Break**: Themes are now separate from the lib, and the default Carbon theme was moved to a `themes/svelte/carbon` subdirectory for now. The goal is to be able to use other kind of themes in the future.
Expand Down
17 changes: 17 additions & 0 deletions src/lib/Crud/Form.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ describe('Submitted form data', () => {
},
testOptions
);

it(
'can handle input containing the same key more than once',
() => {
const submitted = getSubmittedFormData(
mockSubmitEvent([
['title', 'First title'],
['title', 'Second title'],
])
);

expect(submitted).toStrictEqual({
title: ['First title', 'Second title'],
});
},
testOptions
);
});

function mockSubmitEvent(submittedData: Array<[string, string]> = []) {
Expand Down

0 comments on commit 9c9a065

Please sign in to comment.