Skip to content

Commit

Permalink
Add search placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
zaguiini committed Jul 12, 2022
1 parent 30b1217 commit f2a817c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion client/sites-dashboard/components/searchable-sites-table.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ClassNames } from '@emotion/react';
import { useI18n } from '@wordpress/react-i18n';
import { useMemo, useState } from 'react';
import { searchCollection } from 'calypso/components/search-sites/utils';
import { SitesSearch } from './sites-search';
Expand All @@ -10,6 +11,8 @@ interface SearchableSitesTableProps {
}

export function SearchableSitesTable( { sites }: SearchableSitesTableProps ) {
const { __ } = useI18n();

const [ term, setTerm ] = useState( '' );

const filteredSites = useMemo( () => {
Expand All @@ -31,7 +34,12 @@ export function SearchableSitesTable( { sites }: SearchableSitesTableProps ) {
max-width: 100%;
` }
>
<SitesSearch onSearch={ setTerm } delaySearch isReskinned />
<SitesSearch
onSearch={ setTerm }
delaySearch
isReskinned
placeholder={ __( 'Search by name or domain' ) + '...' }
/>
</div>
<SitesTable sites={ filteredSites } />
</>
Expand Down

0 comments on commit f2a817c

Please sign in to comment.