Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit b6cde07

Browse files
committed
fixing map of properties
1 parent 61b4550 commit b6cde07

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/components/headerActions/handlers/buttons/RemoveColumnHandlerAction.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ function removeButton(headerActionResponse: HeaderActionResponse) {
3434
const ddbbConfig = table.options.meta.tableState.configState(
3535
(store) => store.ddbbConfig
3636
);
37+
const columns = table.options.meta.tableState.columns(
38+
(store) => store.columns
39+
);
3740
const [rows, removeDataOfColumn] = table.options.meta.tableState.data(
3841
(store) => [store.rows, store.removeDataOfColumn]
3942
);
@@ -47,7 +50,8 @@ function removeButton(headerActionResponse: HeaderActionResponse) {
4750
row.__note__.getFile(),
4851
hooks.keyState,
4952
undefined, // delete does not need this field
50-
table.options.meta.tableState,
53+
columns,
54+
ddbbConfig,
5155
UpdateRowOptions.REMOVE_COLUMN
5256
);
5357
})

src/parsers/handlers/marshall/MarshallConfigHandler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export class MarshallConfigHandler extends AbstractYamlHandler {
1515
this.addError(`configuration was null or undefined, using default configuration instead`);
1616
} else {
1717
Object.entries(DEFAULT_SETTINGS.local_settings).forEach(([key, value]) => {
18+
1819
if (this.checkNullable(yaml.config[key as keyof LocalSettings])) {
1920
yaml.config = this.loadDefaultConfig(key as keyof LocalSettings, value, yaml.config);
2021
if (value !== "") {

src/stateManagement/useConfigStore.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { DatabaseView } from "DatabaseView";
44
import create from "zustand";
55

66
const useConfigStore = (view: DatabaseView) => {
7-
const { global_settings, local_settings } = view.plugin.settings;
7+
const { global_settings } = view.plugin.settings;
8+
const local_settings = view.diskConfig.yaml.config;
89
return create<ConfigState>()(
910
(set) => ({
1011
ddbbConfig: local_settings,

0 commit comments

Comments
 (0)