Skip to content

Commit 1aae481

Browse files
authored
Merge pull request #58 from smartlabsAT/hotfix/v0.4.1-issue-55-m2m-collection-switch
Hotfix v0.4.1: M2M pivot 403 + collection-switch stale fields (Issue #55)
2 parents a7b88e6 + 87cbe66 commit 1aae481

11 files changed

Lines changed: 1137 additions & 44 deletions

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ All notable changes to the Super Layout Table Extension will be documented in th
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## v0.4.1 — Hotfix: M2M pivot 403 + collection-switch (Issue #55)
9+
10+
### Fixed
11+
- **M2M pivot 403:** `related-values` display no longer queries
12+
`${field}.name` on the junction collection. Field paths now traverse
13+
`junction_field` to the actual target and drop tokens missing there.
14+
- **Collection-switch stale fields:** `useCollection` now receives a
15+
reactive `Ref`, so the field list refreshes when the collection prop
16+
changes. Reported by @draxx318 in #55.
17+
- **M2M display rendering:** Junction-row unwrap also runs for
18+
field-settings displays (was previously override/heuristic only),
19+
fixing literal `{{name}}` leaks.
20+
- **Override on primitive fields:** A column-display template on a
21+
non-relational field now applies to the value instead of returning
22+
em-dash.
23+
24+
### Refactor
25+
- New `expandTokensThroughRelation` helper unifies M2M-junction
26+
traversal across the override, heuristic, and `related-values`
27+
branches of `adjustFieldsForDisplays`. Closes the drift class behind
28+
#34 and #55.
29+
830
## v0.4.0 — Permission-aware layout (Issue #37)
931

1032
### Fixed

index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { computed } from 'vue';
2-
import { defineLayout, useCollection, useStores } from '@directus/extensions-sdk';
2+
import { defineLayout, useStores } from '@directus/extensions-sdk';
33
import { formatTitle } from '@directus/format-title';
44
import LayoutComponent from './src/super-table.vue';
55
import ActionsComponent from './src/actions.vue';
@@ -21,7 +21,6 @@ const layoutConfig = {
2121
setup(props: any, { emit }: any) {
2222
const { useFieldsStore } = useStores();
2323
const fieldsStore = useFieldsStore();
24-
useCollection(props.collection); // parity with super-table.vue
2524

2625
// Issue #48: Expose a flat list of currently visible columns to slot
2726
// components (options sidebar). Each entry uses the *root* field key as id

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "directus-extension-super-table",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "A powerful and feature-rich table layout extension for Directus 11+ with inline editing, quick filters, and manual sorting",
55
"keywords": [
66
"directus",

0 commit comments

Comments
 (0)