From 3d27f1c3ced358bbc031a34331db99990f3d9356 Mon Sep 17 00:00:00 2001 From: LIDRISSI Hamid Date: Mon, 13 Jan 2025 14:17:42 +0100 Subject: [PATCH] fix(pci-object-storage): adapte search filter to MRC ods18 version ref: DTCORE-2950 Signed-off-by: LIDRISSI Hamid --- .../pages/objects/container/Listing.page.tsx | 63 ++++++++------- .../container/object/show/Show.page.tsx | 49 ++++++------ .../objects/container/users/Listing.page.tsx | 79 +++++++++---------- 3 files changed, 92 insertions(+), 99 deletions(-) diff --git a/packages/manager/apps/pci-object-storage/src/pages/objects/container/Listing.page.tsx b/packages/manager/apps/pci-object-storage/src/pages/objects/container/Listing.page.tsx index 6e28d946b296..3642c985e0e2 100644 --- a/packages/manager/apps/pci-object-storage/src/pages/objects/container/Listing.page.tsx +++ b/packages/manager/apps/pci-object-storage/src/pages/objects/container/Listing.page.tsx @@ -89,7 +89,7 @@ export default function ListingPage() { }); }} /> -
+
{ - if (event.key === 'Enter') { - setPagination({ - pageIndex: 0, - pageSize: pagination.pageSize, - }); - addFilter({ - key: 'name', - value: searchField, - comparator: FilterComparator.Includes, - label: '', - }); - setSearchField(''); - } - }} - onOdsChange={(event) => { - const value = event.detail.value.toString(); - setSearchField(value); + onOdsChange={({ detail }) => setSearchField(detail.value as string)} + /> + { + setPagination({ + pageIndex: 0, + pageSize: pagination.pageSize, + }); + addFilter({ + key: 'name', + value: searchField, + comparator: FilterComparator.Includes, + label: '', + }); + setSearchField(''); }} /> -
- -
+ + + -
+
{ - if (event.key === 'Enter') { - if (searchField) { - setSearchField(''); - addFilter({ - key: 'name', - value: searchField, - comparator: FilterComparator.Includes, - label: '', - }); - } - } - }} - onOdsChange={(event) => { - const value = event.detail.value.toString(); - setSearchField(value); + onOdsChange={({ detail }) => + setSearchField(detail.value as string) + } + /> + { + setPagination({ + pageIndex: 0, + pageSize: pagination.pageSize, + }); + addFilter({ + key: 'search', + value: searchField, + comparator: FilterComparator.Includes, + label: '', + }); + setSearchField(''); }} /> - -
+
{ - refresh(); - }} - > + className="xs:mb-0.5 sm:mb-0" + onClick={refresh} + icon="refresh" + label="" + /> { - if (event.key === 'Enter') { - setPagination({ - pageIndex: 0, - pageSize: pagination.pageSize, - }); - addFilter({ - key: 'search', - value: searchField, - comparator: FilterComparator.Includes, - label: '', - }); - setSearchField(''); - } - }} - onOdsChange={(event) => { - const value = event.detail.value.toString(); - setSearchField(value); + className="min-w-[15rem]" + value={searchField} + onOdsChange={({ detail }) => setSearchField(detail.value as string)} + /> + { + setPagination({ + pageIndex: 0, + pageSize: pagination.pageSize, + }); + addFilter({ + key: 'search', + value: searchField, + comparator: FilterComparator.Includes, + label: '', + }); + setSearchField(''); }} /> -
- -
+ +