diff --git a/packages/components/package-lock.json b/packages/components/package-lock.json
index 6ca5f6e086..36148cfc6b 100644
--- a/packages/components/package-lock.json
+++ b/packages/components/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@labkey/components",
- "version": "6.40.0",
+ "version": "6.40.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@labkey/components",
- "version": "6.40.0",
+ "version": "6.40.1",
"license": "SEE LICENSE IN LICENSE.txt",
"dependencies": {
"@hello-pangea/dnd": "18.0.1",
diff --git a/packages/components/package.json b/packages/components/package.json
index 182a554d49..e9217f2b24 100644
--- a/packages/components/package.json
+++ b/packages/components/package.json
@@ -1,6 +1,6 @@
{
"name": "@labkey/components",
- "version": "6.40.0",
+ "version": "6.40.1",
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
"sideEffects": false,
"files": [
diff --git a/packages/components/releaseNotes/components.md b/packages/components/releaseNotes/components.md
index 56da67fc47..430da20f5b 100644
--- a/packages/components/releaseNotes/components.md
+++ b/packages/components/releaseNotes/components.md
@@ -1,6 +1,10 @@
# @labkey/components
Components, models, actions, and utility functions for LabKey applications and pages
+### version 6.40.1
+*Released*: 6 May 2025
+- Issue 52556: Add data-fieldkey attribute to grid header elements and input elements
+
### version 6.40.0
*Released*: 5 May 2025
- Issue 52504: Expose validate lookup setting for sample lookup and turn on by default
diff --git a/packages/components/src/internal/components/ColumnSelectionModal.test.tsx b/packages/components/src/internal/components/ColumnSelectionModal.test.tsx
index 643fed5910..d572e0f1fb 100644
--- a/packages/components/src/internal/components/ColumnSelectionModal.test.tsx
+++ b/packages/components/src/internal/components/ColumnSelectionModal.test.tsx
@@ -52,7 +52,7 @@ describe('ColumnSelectionModal', () => {
test('isInView', () => {
render();
- expect(document.querySelector('.field-name').textContent).toBe('Test Column');
+ expect(document.querySelector('.field-caption').textContent).toBe('Test Column');
expect(document.querySelectorAll('.fa-check')).toHaveLength(1);
expect(document.querySelectorAll('.fa-plus')).toHaveLength(0);
expect(document.querySelectorAll('.field-expand-icon')).toHaveLength(1);
@@ -62,7 +62,7 @@ describe('ColumnSelectionModal', () => {
test('not isInView', () => {
render();
- expect(document.querySelector('.field-name').textContent).toBe('Test Column');
+ expect(document.querySelector('.field-caption').textContent).toBe('Test Column');
expect(document.querySelectorAll('.fa-check')).toHaveLength(0);
expect(document.querySelectorAll('.fa-plus')).toHaveLength(1);
expect(document.querySelectorAll('.field-expand-icon')).toHaveLength(1);
@@ -72,7 +72,7 @@ describe('ColumnSelectionModal', () => {
test('lookup, collapsed', () => {
render();
- expect(document.querySelector('.field-name').textContent).toBe('Test Column');
+ expect(document.querySelector('.field-caption').textContent).toBe('Test Column');
expect(document.querySelectorAll('.fa-check')).toHaveLength(0);
expect(document.querySelectorAll('.fa-plus')).toHaveLength(1);
expect(document.querySelectorAll('.field-expand-icon')).toHaveLength(3);
@@ -82,7 +82,7 @@ describe('ColumnSelectionModal', () => {
test('lookup, expanded', () => {
render();
- expect(document.querySelector('.field-name').textContent).toBe('Test Column');
+ expect(document.querySelector('.field-caption').textContent).toBe('Test Column');
expect(document.querySelectorAll('.fa-check')).toHaveLength(0);
expect(document.querySelectorAll('.fa-plus')).toHaveLength(1);
expect(document.querySelectorAll('.field-expand-icon')).toHaveLength(3);
@@ -116,7 +116,7 @@ describe('ColumnSelectionModal', () => {
}
function validate(column: QueryColumn, deleteDisabled: boolean): void {
- expect(document.querySelector('.field-name span').textContent).toBe(column.caption);
+ expect(document.querySelector('.field-caption span').textContent).toBe(column.caption);
const removeIcon = document.querySelector('.fa-times');
if (deleteDisabled) {
expect(removeIcon).toBeFalsy();
@@ -184,21 +184,21 @@ describe('ColumnSelectionModal', () => {
describe('FieldLabelDisplay', () => {
test('not lookup', () => {
render();
- expect(document.querySelector('.field-name span').textContent).toBe(QUERY_COL.caption);
+ expect(document.querySelector('.field-caption span').textContent).toBe(QUERY_COL.caption);
expect(document.querySelectorAll('.overlay-trigger')).toHaveLength(1);
expect(document.querySelectorAll('input')).toHaveLength(0);
});
test('is lookup', () => {
render();
- expect(document.querySelectorAll('.field-name span')).toHaveLength(1);
+ expect(document.querySelectorAll('.field-caption span')).toHaveLength(1);
expect(document.querySelectorAll('.overlay-trigger')).toHaveLength(1);
expect(document.querySelectorAll('input')).toHaveLength(0);
});
test('is lookup, do not include fieldKey', () => {
render();
- expect(document.querySelectorAll('.field-name')).toHaveLength(1);
+ expect(document.querySelectorAll('.field-caption')).toHaveLength(1);
expect(document.querySelectorAll('.overlay-trigger')).toHaveLength(0);
expect(document.querySelectorAll('input')).toHaveLength(0);
});
diff --git a/packages/components/src/internal/components/ColumnSelectionModal.tsx b/packages/components/src/internal/components/ColumnSelectionModal.tsx
index 5100727782..9ac7e979cc 100644
--- a/packages/components/src/internal/components/ColumnSelectionModal.tsx
+++ b/packages/components/src/internal/components/ColumnSelectionModal.tsx
@@ -74,11 +74,11 @@ export const FieldLabelDisplay: FC = memo(props => {
}
// Issue 46256: use encoded fieldKeyPath, Issue 49795: show tooltip more often to account for renamed fields, etc.
if (!includeFieldKey) {
- return {initialTitle}
;
+ return {initialTitle}
;
}
return (
-
+
{initialTitle}
);
@@ -296,6 +296,7 @@ export const ColumnInView: FC = memo(props => {
{(dragProvided, snapshot) => (