@stonecrop/atable 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atable.js +410 -406
- package/dist/atable.js.map +1 -1
- package/package.json +4 -4
- package/src/components/ACell.vue +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/atable",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Advanced data table component for Stonecrop",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/agritheory/stonecrop/issues"
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@vueuse/components": "^14.2.1",
|
|
37
37
|
"@vueuse/core": "^14.2.1",
|
|
38
|
-
"@stonecrop/schema": "0.
|
|
39
|
-
"@stonecrop/themes": "0.
|
|
40
|
-
"@stonecrop/utilities": "0.
|
|
38
|
+
"@stonecrop/schema": "0.19.0",
|
|
39
|
+
"@stonecrop/themes": "0.19.0",
|
|
40
|
+
"@stonecrop/utilities": "0.19.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@microsoft/api-documenter": "^7.30.5",
|
package/src/components/ACell.vue
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
<script setup lang="ts">
|
|
28
28
|
import { KeypressHandlers, defaultKeypressHandlers, useKeyboardNav } from '@stonecrop/utilities'
|
|
29
|
+
import { linkDisplayFieldname } from '@stonecrop/schema'
|
|
29
30
|
import { useDebounceFn, useElementBounding } from '@vueuse/core'
|
|
30
31
|
import { computed, type CSSProperties, onMounted, ref, useTemplateRef, nextTick } from 'vue'
|
|
31
32
|
|
|
@@ -73,6 +74,13 @@ onMounted(() => {
|
|
|
73
74
|
if (!column.linkDoctype) return
|
|
74
75
|
const raw = store.getCellData(colIndex, rowIndex)
|
|
75
76
|
|
|
77
|
+
// Pre-resolved display text from the record payload (`fieldname__display`).
|
|
78
|
+
const preDisplay = row?.[linkDisplayFieldname(column.name)]
|
|
79
|
+
if (typeof preDisplay === 'string' || typeof preDisplay === 'number') {
|
|
80
|
+
resolvedText.value = String(preDisplay)
|
|
81
|
+
return
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
// Pre-resolved AFormLinkValue object — extract display text directly.
|
|
77
85
|
if (raw !== null && raw !== undefined && typeof raw === 'object') {
|
|
78
86
|
const obj = raw as Record<string, unknown>
|