Skip to content

feat(use-blade): expose activeChildParam for active-row highlighting#243

Open
maksimzinchuk wants to merge 2 commits into
mainfrom
feat/vc-data-table-active-row-from-child-blade
Open

feat(use-blade): expose activeChildParam for active-row highlighting#243
maksimzinchuk wants to merge 2 commits into
mainfrom
feat/vc-data-table-active-row-from-child-blade

Conversation

@maksimzinchuk

Copy link
Copy Markdown
Collaborator

Summary

Adds activeChildParam to useBlade() — a computed of the param of the direct child blade currently open from this blade (or undefined).

This lets a list blade highlight the row whose details blade is open, without manually tracking the open child. It is reactive over the blade stack and reload-safe: on reload the child blade is restored with its param, so the highlight is too.

const { activeChildParam } = useBlade();
// <VcDataTable :active-item-id="activeChildParam" ... />

Test Plan

  • yarn typecheck
  • vitestuseBlade.test.ts (28 tests, incl. new activeChildParam cases)
  • yarn docs:lint — 0 errors
  • eslint / prettier on changed files — clean

Notes

@github-actions

Copy link
Copy Markdown

📦 Preview published for commit 88977c0

Install the preview with dist-tag:

npm install @vc-shell/framework@pr-243

Or pin to the exact commit:

npm install @vc-shell/framework@2.0.10-pr243.88977c0

Published packages (dist-tag pr-243, version 2.0.10-pr243.88977c0):

  • @vc-shell/framework
  • @vc-shell/api-client-generator
  • @vc-shell/create-vc-app
  • @vc-shell/config-generator
  • @vc-shell/migrate
  • @vc-shell/ts-config
  • @vc-shell/mf-config
  • @vc-shell/mf-host
  • @vc-shell/mf-module
  • @vc-shell/vc-app-skill

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