Skip to content

Commit

Permalink
fix: copy grid_options and visibility values on update. Closes #42 (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunosabot authored Feb 2, 2025
1 parent 701de3e commit 40935c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/streamline-card-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ export class StreamlineCardEditor extends HTMLElement {
newConfig.type = formattedConfig.type;
newConfig.template = formattedConfig.template ?? firstTemplate ?? "";
newConfig.variables = formattedConfig.variables ?? {};
if (formattedConfig.grid_options) {
newConfig.grid_options = formattedConfig.grid_options;
}
if (formattedConfig.visibility) {
newConfig.visibility = formattedConfig.visibility;
}
const newConfigWithDefaults = this.setVariablesDefault(newConfig);

if (deepEqual(newConfigWithDefaults, this._config) === false) {
Expand Down

0 comments on commit 40935c7

Please sign in to comment.