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

release of v10.58 #4333

Merged
merged 13 commits into from
Nov 29, 2024
Merged

release of v10.58 #4333

merged 13 commits into from
Nov 29, 2024

Conversation

langz
Copy link
Contributor

@langz langz commented Nov 25, 2024

No description provided.

… string based id (#4331)

This feature allows developers to use a function or a React Context as
the reference instead of a string-based ID. This can be useful for
ensuring a safe local scope, especially when multiple form handlers are
present.

```tsx
const myReference= () => null

const MyField = () => {
  const { data } = Form.useData(myReference)
  return data.foo
} 

render(
<>
  <Form.Handler id={myReference}>
    ...
  </Form.Handler>
  
  <MyField />
</>
)
```
Copy link

vercel bot commented Nov 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 29, 2024 9:25am

Copy link

codesandbox-ci bot commented Nov 25, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

…iners when used in Wizard (#4336)

Fixes #4308

---------

Co-authored-by: Tobias Høegh <[email protected]>
… file list rendering (#4339)

When using `sessionStorageId` on `Form.Handler` alongside `Field.Upload`
with a specified path, file data is stored. However, during
serialization, Blob information is not preserved in session storage. As
a result, reading this data causes `Field.Upload` to throw an exception.

This PR ensures invalid files are not rendered, preventing such errors.

In the future, we could explore storing Blobs in IndexedDB, but that
would require a more extensive effort.
* Also fixed not scrolling to current page when opening menu on small
screens
tujoworker and others added 3 commits November 29, 2024 10:07
…pt types (#4343)

The main change is that we go from:

```tsx
type JsonObject = any
```

to

```tsx
type JsonObject = Record<string | number, unknown> | Array<unknown>
```

and enhance the TypeScript support docs for the "Getting Started"
section the `Form.Handler` and `Form.Isolation` docs.

To disable types you can do so by:


```tsx
<Form.Handler<any>>
...
</Form.Handler>
```

or

```tsx
const { data } = Form.useData<any>()
```
…ops that have changed (#4342)

- [x] Add test
- [x] FIx same issue in `range` mode
- [x] Update failing `Field.Date` test
- [x] Clean up `updateBasedOnProps` code


Should hopefully fix the issue described
[here](https://dnb-it.slack.com/archives/CMXABCHEY/p1732031524606929)

Neither of us were able to recreate the issue in csb, so testing this
manually might be a challenge

This also improves input deletion behaviour when the dates are prop
controlled

Before:


https://github.com/user-attachments/assets/2331ac62-e758-44aa-8a93-fcd042a7fc6e


After:


https://github.com/user-attachments/assets/6c3aa9a3-1d01-415e-8028-6626d42b0e3c

---------

Co-authored-by: Tobias Høegh <[email protected]>
@langz langz merged commit 27f7d0f into release Nov 29, 2024
9 checks passed
@tujoworker
Copy link
Member

🎉 This PR is included in version 10.58.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants