@@ -109,15 +109,17 @@ const ApplicationList: React.FC<ApplicationProps> = ({
109109 return sortData ( applications , sortBy , direction ) ;
110110 } , [ applications , sortBy , direction ] ) ;
111111
112- // Filter applications by project or appset BEFORE calculating filter counts
113- const filteredByOwner = React . useMemo (
112+ // Filter applications by project or appset FIRST - before PatternFly filters
113+ // This ensures PF filters work on the correct dataset (owned apps only)
114+ const ownedApps = React . useMemo (
114115 ( ) => sortedApplications . filter ( filterApp ( project , appset ) ) ,
115116 [ sortedApplications , project , appset ] ,
116117 ) ;
117118
118119 // TODO: use alternate filter since it is deprecated. See DataTableView potentially
120+ // PatternFly filters work on owned apps only (the dataset that will be displayed)
119121 const filters = getFilters ( t ) ;
120- const [ data , filteredData , onFilterChange ] = useListPageFilter ( filteredByOwner , filters ) ;
122+ const [ data , filteredData , onFilterChange ] = useListPageFilter ( ownedApps , filters ) ;
121123
122124 // Filter by search query if present (after other filters)
123125 const filteredBySearch = React . useMemo ( ( ) => {
@@ -134,10 +136,8 @@ const ApplicationList: React.FC<ApplicationProps> = ({
134136 } , [ filteredData , searchQuery ] ) ;
135137 const rows = useApplicationRowsDV ( filteredBySearch , namespace ) ;
136138
137- // Check if there are applications owned by this ApplicationSet initially (before search)
138- const hasOwnedApplications = React . useMemo ( ( ) => {
139- return filteredByOwner . length > 0 ;
140- } , [ filteredByOwner ] ) ;
139+ // Check if there are applications owned by this ApplicationSet initially (before filters/search)
140+ const hasOwnedApplications = ownedApps . length > 0 ;
141141 const empty = (
142142 < Tbody >
143143 < Tr key = "loading" ouiaId = "table-tr-loading" >
0 commit comments