mirror of
https://github.com/mathuo/dockview
synced 2025-02-19 06:35:45 +00:00
chore: prepare v1.7.4
This commit is contained in:
parent
88565f022c
commit
d9906eb802
20
packages/docs/blog/2023-06-14-dockview-1.7.4.md
Normal file
20
packages/docs/blog/2023-06-14-dockview-1.7.4.md
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
slug: dockview-1.7.4-release
|
||||
title: Dockview 1.7.4
|
||||
tags: [release]
|
||||
---
|
||||
|
||||
# Release Notes
|
||||
|
||||
Please reference to docs @ [dockview.dev](https://dockview.dev).
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- Improvements and tests added to the panel `api.updateParameters(...)` method [#265](https://github.com/mathuo/dockview/pull/265)
|
||||
|
||||
## 🛠 Miscs
|
||||
|
||||
- Fix bug associated with overidding panel titles when using `api.updateParameters(...)` [#265](https://github.com/mathuo/dockview/pull/265)
|
||||
- Cleanup listeners and disposables after use [#257](https://github.com/mathuo/dockview/pull/257)
|
||||
|
||||
## 🔥 Breaking changes
|
@ -435,6 +435,40 @@ const panel2 = api.addPanel({
|
||||
});
|
||||
```
|
||||
|
||||
### Update Panel
|
||||
|
||||
You can programatically update the `params` passed through to the panel through the panal api using `api.updateParameters`.
|
||||
|
||||
```ts
|
||||
const panel = api.addPanel({
|
||||
id: 'panel_1',
|
||||
component: 'default',
|
||||
params: {
|
||||
keyA: 'valueA',
|
||||
},
|
||||
});
|
||||
|
||||
// ...
|
||||
|
||||
panel.api.updateParameters({
|
||||
keyB: 'valueB',
|
||||
});
|
||||
|
||||
// ...
|
||||
|
||||
panel.api.updateParameters({
|
||||
keyA: 'anotherValueA',
|
||||
});
|
||||
```
|
||||
|
||||
To delete a parameter you should pass a value of `undefined` for the key.
|
||||
|
||||
```ts
|
||||
panel.api.updateParameters({
|
||||
keyA: undefined, // this will delete 'keyA'.
|
||||
});
|
||||
```
|
||||
|
||||
### Panel Rendering
|
||||
|
||||
By default `DockviewReact` only adds to the DOM those panels that are visible,
|
@ -1,3 +1,3 @@
|
||||
[
|
||||
"1.7.3"
|
||||
]
|
||||
"1.7.4"
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user