Skip to content

Commit

Permalink
UIEH-1439: Pass the �syncFilter property to the Selection component o…
Browse files Browse the repository at this point in the history
…f packages.
  • Loading branch information
Dmytro-Melnyshyn committed Nov 5, 2024
1 parent f196661 commit 5b65ef0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Return permissions: `kb-ebsco.kb-credentials.uc.item.get`, `kb-ebsco.kb-credentials.item.get`. (UIEH-1434)
* migrate to shared CI workflows. (UIEH-1429)
* Rename permissions to match the naming convention. (UIEH-1436)
* Pass the `asyncFilter` property to the `Selection` component of packages. (UIEH-1439)

## [9.1.1] (https://github.com/folio-org/ui-eholdings/tree/v9.1.1) (2024-03-24)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function validate(value) {
return value ? undefined : <FormattedMessage id="ui-eholdings.validate.errors.packageSelect.required" />;
}

const FILTER_DEBOUNCE_MS = 1000;
const FILTER_DEBOUNCE_MS = 800;

const PackageSelectField = ({
options,
Expand Down Expand Up @@ -47,6 +47,7 @@ const PackageSelectField = ({
placeholder={intl.formatMessage({ id: 'ui-eholdings.title.chooseAPackage' })}
dataOptions={options.filter(option => option.label && !option.disabled)}
required
asyncFilter
onFilter={handleFilter}
data-testid="package-select-field"
loading={loadingOptions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('Given PackageSelectField', () => {
const input = getAllByLabelText('stripes-components.selection.filterOptionsLabel')[0];

fireEvent.change(input, { target: { value: 'packageName' } });
expect(debounce).toHaveBeenCalledWith(mockOnFilter, 1000);
expect(debounce).toHaveBeenCalledWith(mockOnFilter, 800);
expect(mockOnFilter).toHaveBeenCalled();
});
});

0 comments on commit 5b65ef0

Please sign in to comment.