Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8963 - Fixed special characters being encoded in editor #8979

Merged
merged 3 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/components/datagrid/datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
22 changes: 22 additions & 0 deletions tests/datagrid/datagrid.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});
});
Loading