feat: improve/refactor focus handling (#17796)

* feat: improve focus

* test

* lint

* use modulus in loop
This commit is contained in:
Min Idzelis
2025-04-30 00:19:38 -04:00
committed by GitHub
parent 2e8a286540
commit 4b1ced439b
11 changed files with 92 additions and 129 deletions

View File

@@ -14,7 +14,6 @@ export class AssetInteraction {
return this.assetSelectionCandidates.some((asset) => asset.id === assetId);
}
assetSelectionStart = $state<AssetResponseDto | null>(null);
focussedAssetId = $state<string | null>(null);
selectionActive = $derived(this.selectedAssets.length > 0);
private user = fromStore<UserAdminResponseDto | undefined>(user);
@@ -73,8 +72,4 @@ export class AssetInteraction {
this.assetSelectionCandidates = [];
this.assetSelectionStart = null;
}
isFocussedAsset(assetId: string) {
return this.focussedAssetId === assetId;
}
}