Skip to content

Commit

Permalink
Merge pull request #704 from Ekep-Obasi/fix-table-flips-after-delete
Browse files Browse the repository at this point in the history
Fix table flips after delete
  • Loading branch information
tomsmith8 authored Dec 20, 2023
2 parents 45b613d + 401ff79 commit e5c750e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/components/SourcesTableModal/SourcesView/Sources/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,12 @@ export const Sources = () => {

const tableValues = useMemo(
() =>
sources
?.filter(
(val: TSources) =>
(!typeFilter || val.source_type === typeFilter) &&
(val.source.toLowerCase().startsWith(search.toLowerCase()) ||
val.source.toLowerCase().includes(search.toLowerCase())),
)
.reverse(),
sources?.filter(
(val: TSources) =>
(!typeFilter || val.source_type === typeFilter) &&
(val.source.toLowerCase().startsWith(search.toLowerCase()) ||
val.source.toLowerCase().includes(search.toLowerCase())),
),
[search, typeFilter, sources],
)

Expand Down

0 comments on commit e5c750e

Please sign in to comment.