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

Fix Datagrid row does not appear clickable although it is #10160

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

fzaninotto
Copy link
Member

Closes #10155

fireEvent.click(screen.getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this test is made to please typescript, who complains on the following line that row may be undefined when trying to access the row classList. It works with my test, not with expect(row).toBeDefined();

fireEvent.click(screen.getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

fireEvent.click(screen.getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

fireEvent.click(getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

fireEvent.click(getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

fireEvent.click(screen.getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

fireEvent.click(screen.getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

fireEvent.click(screen.getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

fireEvent.click(screen.getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

fireEvent.click(screen.getByText('hello'));
const cell = screen.getByText('hello');
const row = cell.closest('tr');
if (!row) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use expect(row).toBeDefined();

@slax57 slax57 added this to the 5.1.3 milestone Aug 28, 2024
@slax57 slax57 merged commit 172a3bf into master Aug 28, 2024
14 checks passed
@slax57 slax57 deleted the fix-datagrid-row-style-rowclick branch August 28, 2024 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datagrid rows do not appear as clickable, although they are
3 participants