Skip to content

fix(deps): bump various versions #462

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

Merged
merged 3 commits into from
May 30, 2025
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
85 changes: 43 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions packages/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
"@patternfly/patternfly": "^6.0.0",
"@patternfly/react-code-editor": "^6.0.0",
"@patternfly/patternfly-a11y": "^5.1.0",
"@types/react": "^18.3.21",
"@types/react-dom": "^18.3.5",
"@types/react": "^18.3.23",
"@types/react-dom": "^18.3.7",
"@types/react-router-dom": "^5.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^6.30.0",
"react-router-dom": "^6.30.0",
"react-router": "^6.30.1",
"react-router-dom": "^6.30.1",
"rimraf": "^6.0.1",
"typescript": "^5.4.5"
"typescript": "^5.8.3"
}
}
20 changes: 19 additions & 1 deletion packages/module/src/DataViewFilters/DataViewFilters.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { render } from '@testing-library/react';
import { render, fireEvent } from '@testing-library/react';
import DataViewFilters from './DataViewFilters';
import DataViewToolbar from '../DataViewToolbar';
import DataViewTextFilter from '../DataViewTextFilter';
Expand All @@ -18,4 +18,22 @@ describe('DataViewFilters component', () => {
/>);
expect(container).toMatchSnapshot();
});

it('should call onChange with correct key and value when filter changes', () => {
const mockOnChange = jest.fn();
const { getByLabelText } = render(
<DataViewToolbar
filters={
<DataViewFilters onChange={mockOnChange} values={{}}>
<DataViewTextFilter filterId="one" title="One" />
<DataViewTextFilter filterId="two" title="Two" />
</DataViewFilters>
}
/>
);
const input = getByLabelText('One filter');
input.focus();
fireEvent.input(input, { target: { value: 'abc' } });
expect(mockOnChange).toHaveBeenCalledWith('one', { one: 'abc' });
});
});
2 changes: 1 addition & 1 deletion packages/module/src/DataViewFilters/DataViewFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const DataViewFilters = <T extends object>({
value: unknown;
}>, {
showToolbarItem: activeAttributeMenu === child.props.title,
onChange: (event, value) => onChange?.(event, { [child.props.filterId]: value } as Partial<T>),
onChange: (event, value) => onChange?.(child.props.filterId, { [child.props.filterId]: value } as Partial<T>),
value: values?.[child.props.filterId],
...child.props
})
Expand Down
Loading