feat(views/table): display a dialog to add a new column

This commit is contained in:
Elian Doran
2025-06-27 22:19:09 +03:00
parent f8e10f36db
commit fe1dbb4cbf
3 changed files with 50 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import server from "../../../services/server.js";
import type { GridApi, GridState } from "ag-grid-community";
import SpacedUpdate from "../../../services/spaced_update.js";
import branches from "../../../services/branches.js";
import type { CommandListenerData } from "../../../components/app_context.js";
const TPL = /*html*/`
<div class="table-view">
@@ -33,6 +34,10 @@ const TPL = /*html*/`
}
</style>
<div class="header">
<button data-trigger-command="addNoteListItem">Add new column</button>
</div>
<div class="table-view-container"></div>
</div>
`;
@@ -158,5 +163,17 @@ export default class TableView extends ViewMode<StateInfo> {
};
return config;
}
async saveAttributesCommand() {
console.log("Save attributes");
}
async reloadAttributesCommand() {
console.log("Reload attributes");
}
async updateAttributeListCommand({ attributes }: CommandListenerData<"updateAttributeList">) {
console.log("Update attributes", { attributes });
}
}