Skip to content

Commit

Permalink
fix(container): fix project listing searchbox in legacy sidebar
Browse files Browse the repository at this point in the history
- Fixed button visibility and misalignment
- Fixed search not accepting caps in search
ref: PRB0041877

Signed-off-by: Dustin Kroger <[email protected]>
  • Loading branch information
aottr committed Jan 13, 2025
1 parent 955f5d9 commit dca3f90
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,18 @@ export default function PublicCloudSidebar() {

<div className={style.projectSearch}>
<i className="ovh-font ovh-font-search" aria-hidden="true"></i>
<input
type="search"
className="oui-input"
placeholder={t('sidebar_pci_project_search')}
value={projectSearchQuery}
onChange={(e) => {
setProjectSearchQuery(e.target.value);
}}
></input>
{projectSearchQuery && (
<button
className="d-block"
className="d-block border-0 bg-transparent"
onClick={() => setProjectSearchQuery('')}
>
<i
Expand All @@ -134,15 +143,6 @@ export default function PublicCloudSidebar() {
></i>
</button>
)}
<input
type="search"
className="oui-input"
placeholder={t('sidebar_pci_project_search')}
value={projectSearchQuery}
onChange={(e) => {
setProjectSearchQuery(e.target.value);
}}
></input>
</div>

{projects
Expand All @@ -151,7 +151,7 @@ export default function PublicCloudSidebar() {
return (
(project.description || project.project_id)
?.toLowerCase()
.indexOf(projectSearchQuery.trim()) >= 0
.indexOf(projectSearchQuery.toLowerCase().trim()) >= 0
);
}
return true;
Expand Down

0 comments on commit dca3f90

Please sign in to comment.