Skip to content
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

[atable] use a single Pinia store to manage table data #232

Closed
wants to merge 1 commit into from

Conversation

Alchez
Copy link
Collaborator

@Alchez Alchez commented Jan 3, 2025

Implement a single Pinia store to manage table data for multiple tables.

  • Store Implementation

    • Add useTableStore in atable/src/stores/table.ts to manage table data for multiple tables.
    • Define state, getters, and actions for managing table data.
    • Implement functions to get and set cell data, toggle row expansion, and handle modal visibility.
  • Component Updates

    • Update ATable.vue to use the shared table store and manage multiple table instances.
    • Modify ACell.vue, ARow.vue, AExpansionRow.vue, ATableHeader.vue, and ATableModal.vue to use the shared table store and handle table-specific data using tableId.
  • Tests

    • Update table.spec.ts to initialize the shared table store and verify multiple table instances.

For more details, open the Copilot Workspace session.

Implement a single Pinia store to manage table data for multiple tables.

* **Store Implementation**
  - Add `useTableStore` in `atable/src/stores/table.ts` to manage table data for multiple tables.
  - Define state, getters, and actions for managing table data.
  - Implement functions to get and set cell data, toggle row expansion, and handle modal visibility.

* **Component Updates**
  - Update `ATable.vue` to use the shared table store and manage multiple table instances.
  - Modify `ACell.vue`, `ARow.vue`, `AExpansionRow.vue`, `ATableHeader.vue`, and `ATableModal.vue` to use the shared table store and handle table-specific data using `tableId`.

* **Tests**
  - Update `table.spec.ts` to initialize the shared table store and verify multiple table instances.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/agritheory/stonecrop?shareId=XXXX-XXXX-XXXX-XXXX).
@Alchez Alchez changed the title Use a single Pinia store to manage table data [atable] use a single Pinia store to manage table data Jan 3, 2025
@Alchez Alchez marked this pull request as draft January 3, 2025 09:29
@Alchez Alchez closed this Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant