diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ebe73528ce..8c4cc5420b 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -16,6 +16,7 @@ - `[Datagrid]` Updated styles so pager works on cards. ([NG#1756](https://github.com/infor-design/enterprise-ng/issues/1756)) - `[Datagrid]` Fixed a bug where text is misaligned in action dropdown . ([#8957](https://github.com/infor-design/enterprise-ng/issues/8957)) - `[Datagrid]` Fixed auto sizing on columns in tree grid. ([#8646](https://github.com/infor-design/enterprise/issues/8646)) +- `[Datagrid]` Fixed special characters being encoded in editor. ([#8963](https://github.com/infor-design/enterprise/issues/8963)) - `[General]` Upgrade dependencies, this involved updating sass and test dependencies with a few css deprecations that were fixed. ([#8947](https://github.com/infor-design/enterprise-ng/issues/8947)) - `[Locale]` Fixed translation issue of `small` into Spanish. ([#8962](https://github.com/infor-design/enterprise-wc/issues/8962) - `[Locale]` Fixed translation issue of `Available` into Thai and Italian. ([#8786](https://github.com/infor-design/enterprise-wc/issues/8786) diff --git a/src/components/datagrid/datagrid.js b/src/components/datagrid/datagrid.js index 13f80c12e9..1c8078afcd 100644 --- a/src/components/datagrid/datagrid.js +++ b/src/components/datagrid/datagrid.js @@ -10903,7 +10903,7 @@ Datagrid.prototype = { } if (this.editor.useValue) { - cellValue = this.fieldValue(rowData, col.field); + cellValue = this.fieldValue(rowData, col.field, false); } this.editor.val(cellValue); diff --git a/tests/datagrid/datagrid.spec.js b/tests/datagrid/datagrid.spec.js index f687848bbb..73fbbd6a86 100644 --- a/tests/datagrid/datagrid.spec.js +++ b/tests/datagrid/datagrid.spec.js @@ -80,4 +80,26 @@ test.describe('Datagrid tests', () => { }); }); }); + + test.describe('Inline editor page tests', () => { + const url = '/components/datagrid/test-editable-with-inline-editor.html'; + + test.beforeEach(async ({ page }) => { + await page.goto(url); + }); + + test.describe('edit cell tests', () => { + test('value should stay the same', async ({ page }) => { + const val = '&<>'; + const input = page.locator('#datagrid-inline-input-2-2'); + + await input.click(); + await input.fill(val); + await page.locator('body').click({ position: { x: 0, y: 0 } }); + await input.click(); + + await expect(input).toHaveValue(val); + }); + }); + }); });