Skip to content

Commit

Permalink
Remove hstack form search
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Jul 18, 2024
1 parent 2bc213f commit 6c19704
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
20 changes: 7 additions & 13 deletions packages/dataviews/src/dataviews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,13 @@ export default function DataViews< Item >( {
justify="start"
className="dataviews-filters__view-actions"
>
<HStack
justify="start"
className="dataviews-search__container"
wrap
>
{ search && (
<Search
label={ searchLabel }
view={ view }
onChangeView={ onChangeView }
/>
) }
</HStack>
{ search && (
<Search
label={ searchLabel }
view={ view }
onChangeView={ onChangeView }
/>
) }
{ [ LAYOUT_TABLE, LAYOUT_GRID ].includes( view.type ) &&
hasPossibleBulkAction && (
<BulkActions
Expand Down
1 change: 1 addition & 0 deletions packages/dataviews/src/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const Search = memo( function Search( {
const searchLabel = label || __( 'Search' );
return (
<SearchControl
className="dataviews-search"
__nextHasNoMarginBottom
onChange={ setSearch }
value={ search }
Expand Down
4 changes: 4 additions & 0 deletions packages/dataviews/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -972,3 +972,7 @@
outline: $border-width solid $white;
color: $white;
}

.dataviews-search {
width: 100%;
}

0 comments on commit 6c19704

Please sign in to comment.