Skip to content

Commit

Permalink
fix(application request): fix issues related to filtering in the page…
Browse files Browse the repository at this point in the history
…. reset results if input text is cleared (#509)
  • Loading branch information
manojava-gk authored Feb 15, 2024
1 parent 110af08 commit 4b85d54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 1.8.0-RC5

- Application Requests
- Fix filtering related issues
- Reset search list after clearing input text

### Bugfix

- Notifications - fixed handling of setting read/unread correctly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,10 @@ export const RequestList = ({
}

useEffect(() => {
if (onValidate(searchExpr)) {
setFetchHookArgs({
statusFilter: filterStatus,
expr: searchExpr,
})
}
setFetchHookArgs({
statusFilter: filterStatus,
expr: onValidate(searchExpr) ? searchExpr : '',
})
// eslint-disable-next-line
}, [filterStatus, searchExpr])

Expand Down Expand Up @@ -136,7 +134,7 @@ export const RequestList = ({
<section id="registration-section-id">
<PageLoadingTable<ApplicationRequest, FetchHookArgsType>
searchExpr={searchExpr}
rowHeight={group !== AppFilterType.CLOSED ? 160 : 80}
rowHeight={group !== AppFilterType.CLOSED ? 160 : 110}
alignCell="start"
onCellClick={onTableCellClick}
toolbarVariant={'searchAndFilter'}
Expand All @@ -145,7 +143,7 @@ export const RequestList = ({
searchPlaceholder={t('global.table.searchName')}
searchInputData={searchInputData}
onSearch={(expr: string) => {
if (!onValidate(expr)) return
if (expr !== '' && !onValidate(expr)) return
setRefresh(Date.now())
setSearchExpr(expr)
}}
Expand Down

0 comments on commit 4b85d54

Please sign in to comment.