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

Horizontal Filter Reset Not Working #1495

Open
addiedavis opened this issue Jul 26, 2024 · 3 comments · May be fixed by #1563
Open

Horizontal Filter Reset Not Working #1495

addiedavis opened this issue Jul 26, 2024 · 3 comments · May be fixed by #1563
Assignees

Comments

@addiedavis
Copy link

addiedavis commented Jul 26, 2024

Components Involved
Horizontal Filter

Expected Behavior
Every time the reset button is selected on the horizontal filter, the filter emits an empty filter object.

Actual Behavior
When a reset of the filter occurs it only emits the empty filter on the first click.
Subsequent clicks of the reset button do not emit an empty filter.

Your Environment
Angular Version: 17.3.8
@gsa-sam/components: 17.0.5
@gsa-sam/icons: 1.0.0
@gsa-sam/layout: 17.0.1
@gsa-sam/layouts: 17.0.3
@gsa-sam/ngx-uswds: 17.0.1
@gsa-sam/ngx-uswds-icons: 17.0.0
@gsa-sam/sam-formly: 17.0.5
@gsa-sam/sam-material-extensions: 17.0.5
@gsa-sam/sam-styles: 3.0.18
@gsa-sam/shared: 17.0.3

Ticket Number
IAEMOD-28579

Additional context
Recording of the horizontal filter on 07/26/2024 from https://gsa.github.io/sam-design-system/?path=/story/formly-filter--horizontal

https://drive.google.com/file/d/1HO0K5Mdvx1ObKl9zt5S09Q3e_cZbL8FV/view

@addiedavis
Copy link
Author

Update with the new libs:
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]

The reset functionality is broken and selecting the reset does not reset the filter at all.
The labels once selected, the green box displaying the selected option, the 'x' in that box no longer un-selects that option

The component also broke our test because the formControl seems disconnected.
The test that suddenly started failing is as follows:

it('should clearFilters', () => {
component.fileds[0].fieldGroup[0].formControl.setVlue('test');
component.clearFilters();
expect(component.fields[0].fieldGroup[0].formControl.value).toBeUndefined();
});

It failed because 'component.fileds[0].fieldGroup[0].formControl.' is undefined.
component.fileds[0].fieldGroup[0] is defined but there is no formControl on it.

@addiedavis addiedavis changed the title Horizontal Filter Reset Not Emitting After the First Reset Horizontal Filter Reset Not Working Oct 3, 2024
@addiedavis
Copy link
Author

Update with the new libs:
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]
@gsa-sam/[email protected]

These are currently in 55sam comp, /content/entity-information/resources/legacy-ct-code page

When the CT Code is selected, the green box with that filter does not appear.
If a CT Code is in the filter, it does not allow me to select another CT Code.
The keyword does not add a green box when added.
The only way the green boxes appear is if a CT Code AND an Exclusion Type are both in the filter.

The reset button is still not resetting the filters when selected.

@addiedavis
Copy link
Author

For more information here is another video recording going through the legacy-ct-codes page in COMP
https://drive.google.com/file/d/18ISivEdudh95fif9pQxDjrx-dJRwvWzQ/view

@shayan-roshan shayan-roshan self-assigned this Oct 7, 2024
@shayan-roshan shayan-roshan linked a pull request Nov 15, 2024 that will close this issue
16 tasks
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 a pull request may close this issue.

2 participants