-
Notifications
You must be signed in to change notification settings - Fork 28
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
DockviewApi.toJSON doesn't include panel titles #258
Comments
Thank you and thanks for the report. Which version are you using? I have an example here using the latest version 1.7.2 which seems to persist and reload a custom panel title but I may be missing something. You might be able to adjust my example to "break it"? |
I think I've narrowed it down. api.addPanel({
id: "panel_1",
component: "default",
// title here
title: "Heatmap",
params: {
// title here also
title: "Heatmap",
},
}); Reproducible codesandbox: https://codesandbox.io/p/sandbox/stoic-napier-lnz49u?file=%2Fsrc%2Fapp.tsx%3A26%2C1-33%2C6
Screen.Recording.2023-05-30.at.12.27.09.PM.mov |
Nice! Thanks, found the problem. There is a bug in the code where the title parameter and a key of title in the user parameters are used wrongly, I believe I've fixed with the attached branch. I will confirm and get a patched release out. |
Sandbox example using the build created from this branch as evidence of a working fix. |
That seems great! |
1.7.3 published with fix - thanks for the help in finding the bug |
I think I've discovered another related bug: If I use |
Damn, sorry yeah I see this - seems to be an existing bug again. I will take a deeper look at this logic and add tests. |
I think I'm still seeing the bug, gonna try and make a sandbox |
My bad, just had to clean node_modules. Looks good, Thanks! |
v.1.7.5 published with fixes |
Hi, I absolutely love the work you're doing with this library :), and am trying to use it.
Describe the bug
I think I've run into a bug where the panel title is not included in the JSON, causing the title to reset to the id when you refresh (persistent layout).
Steps to reproduce the behavior:
DockviewApi.toJSON()
Expected behavior
Expected title to be included in the JSON
The text was updated successfully, but these errors were encountered: