Skip to content

Commit

Permalink
fix after QA
Browse files Browse the repository at this point in the history
  • Loading branch information
tischsoic committed Feb 27, 2024
1 parent a336b0c commit 62c99e5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,24 @@
}

&__table-header {
flex-direction: column;
align-items: flex-start;
display: grid;
grid-template: 'title clear-search-btn' 'subtitle subtitle';
justify-content: start;
margin-top: calculateRem(16px);
}

&__table-tile {
grid-area: title;
font-size: $ibexa-text-font-size-extra-large;
}

&__clear-results-btn {
grid-area: clear-search-btn;
margin-left: calculateRem(16px);
}

&__table-subtitle {
grid-area: subtitle;
display: inline-block;
margin-bottom: calculateRem(8px);
font-size: $ibexa-text-font-size-medium;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Search = ({ itemsPerPage }) => {
const allowedContentTypes = useContext(AllowedContentTypesContext);
const [, setMarkedLocationId] = useContext(MarkedLocationIdContext);
const [, setActiveTab, previousActiveTab, initialActiveTab] = useContext(ActiveTabContext);
const [searchText] = useContext(SearchTextContext);
const [searchText, setSearchText] = useContext(SearchTextContext);
const [offset, setOffset] = useState(0);
const [selectedContentTypes, dispatchSelectedContentTypesAction] = useReducer(selectedContentTypesReducer, []);
const [selectedSection, setSelectedSection] = useState('');
Expand Down Expand Up @@ -71,6 +71,7 @@ const Search = ({ itemsPerPage }) => {
const activeTabNew = previousActiveTab ?? initialActiveTab;

setActiveTab(activeTabNew);
setSearchText('');
};
const renderCustomTableHeader = () => {
const selectedLanguageName = languages.mappings[selectedLanguage].name;
Expand All @@ -96,16 +97,14 @@ const Search = ({ itemsPerPage }) => {
return (
<>
<div className="ibexa-table-header c-search__table-header">
<div className="ibexa-table-header__headline c-search__table-title">
{searchResultsTitle}
<button
type="button"
className="btn ibexa-btn ibexa-btn--secondary ibexa-btn--small c-search__clear-results-btn"
onClick={handleResultsClear}
>
{searchResultsClearBtnLabel}
</button>
</div>
<div className="ibexa-table-header__headline c-search__table-title">{searchResultsTitle}</div>
<button
type="button"
className="btn ibexa-btn ibexa-btn--secondary ibexa-btn--small c-search__clear-results-btn"
onClick={handleResultsClear}
>
{searchResultsClearBtnLabel}
</button>
<div className="c-search__table-subtitle">{searchResultsSubtitle}</div>
<div className="c-search__search-tags">
<SearchTags />
Expand Down

0 comments on commit 62c99e5

Please sign in to comment.