fix(grid): remove inline NULL badge from result header
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
This commit is contained in:
1 parent
a3cf5fe256
commit
fff07ada83
2 files changed
+4
-9
No files matched your search
@@ -387,7 +387,7 @@ describe("DataGridColumnHeader", () => {
|
||||
expect(findAll(mounted.root, (node) => node.props["data-grid-header-comment-line"] === "")).toHaveLength(0);
|
||||
});
|
||||
|
||||
it("marks nullable columns without marking required columns", () => {
|
||||
it("shows column nullability in the header tooltip without an inline badge", () => {
|
||||
const baseProps = {
|
||||
name: "nickname",
|
||||
actualColumnIndex: 1,
|
||||
@@ -406,12 +406,10 @@ describe("DataGridColumnHeader", () => {
|
||||
};
|
||||
const nullable = mountComponent(DataGridColumnHeader, { ...baseProps, columnNullability: "nullable" });
|
||||
const required = mountComponent(DataGridColumnHeader, { ...baseProps, columnNullability: "required" });
|
||||
const badge = findOne(nullable.root, (node) => node.props["data-grid-header-nullable"] === "");
|
||||
|
||||
expect(hostText(badge).trim()).toBe("NULL");
|
||||
expect(badge.props.title).toBe("nullable");
|
||||
expect(hostText(nullable.root)).toContain("nullableyes");
|
||||
expect(findAll(nullable.root, (node) => node.props["data-grid-header-nullable"] === "")).toHaveLength(0);
|
||||
expect(findAll(required.root, (node) => node.props["data-grid-header-nullable"] === "")).toHaveLength(0);
|
||||
expect(hostText(nullable.root)).toContain("nullableyes");
|
||||
expect(hostText(required.root)).toContain("nullableno");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user