mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Fixed clients search
This commit is contained in:
parent
f53a498c03
commit
69ee579139
1 changed files with 7 additions and 2 deletions
|
@ -142,6 +142,11 @@ class _AddedListState extends State<AddedList> {
|
|||
)
|
||||
);
|
||||
}
|
||||
final clientsDisplay = clientsProvider.searchTermClients != null && clientsProvider.searchTermClients != ""
|
||||
? widget.data.where(
|
||||
(c) => c.name.toLowerCase().contains(clientsProvider.searchTermClients.toString()) || c.ids.where((id) => id.contains(clientsProvider.searchTermClients.toString())).isNotEmpty
|
||||
).toList()
|
||||
: widget.data;
|
||||
|
||||
return CustomTabContentList(
|
||||
listPadding: widget.splitView == true
|
||||
|
@ -166,10 +171,10 @@ class _AddedListState extends State<AddedList> {
|
|||
],
|
||||
),
|
||||
),
|
||||
itemsCount: widget.data.length,
|
||||
itemsCount: clientsDisplay.length,
|
||||
contentWidget: (index) => AddedClientTile(
|
||||
selectedClient: widget.selectedClient,
|
||||
client: widget.data[index],
|
||||
client: clientsDisplay[index],
|
||||
onTap: widget.onClientSelected,
|
||||
onEdit: statusProvider.serverStatus != null
|
||||
? (c) => openClientModal(c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue