Skip to content

Commit

Permalink
Merge pull request #131 from oarepo/less-fixes
Browse files Browse the repository at this point in the history
fixed less issues
  • Loading branch information
mirekys authored Feb 19, 2024
2 parents db0b8e5 + acb720c commit d4d23b2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const CountElement = ({ totalResults }) => {
};

export const ResultCount = ({ currentResultsState = {} }) => {
const { total } = currentResultsState.data;
const total = currentResultsState?.data?.total;
const { loading } = currentResultsState;
// determine if we are in searchApp context or pure searchkit
const searchAppContext = useContext(SearchConfigurationContext);
Expand All @@ -34,5 +34,7 @@ export const ResultCount = ({ currentResultsState = {} }) => {
CountElement.propTypes = {
totalResults: PropTypes.number.isRequired,
};

ResultCount.propTypes = {
currentResultsState: PropTypes.object,
};
export const ResultCountWithState = withState(ResultCount);
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ export const SearchappSearchbarElement = withState(
currentQueryState,
iconName,
iconColor,
placeholderText,
placeholder: passedPlaceholder,
}) => {
const placeholder = passedPlaceholder || i18next.t("Search");

const onSearch = () => {
updateQueryState({ ...currentQueryState, queryString });
};
Expand All @@ -36,8 +38,8 @@ export const SearchappSearchbarElement = withState(
"aria-label": i18next.t("Search"),
}}
fluid
placeholder={placeholderText}
aria-label={placeholderText}
placeholder={placeholder}
aria-label={placeholder}
onChange={(event, { value }) => {
onInputChange(value);
}}
Expand All @@ -49,7 +51,7 @@ export const SearchappSearchbarElement = withState(
);

SearchappSearchbarElement.propTypes = {
placeholderText: PropTypes.string,
placeholder: PropTypes.string,
queryString: PropTypes.string,
onInputChange: PropTypes.func,
updateQueryState: PropTypes.func,
Expand All @@ -59,7 +61,7 @@ SearchappSearchbarElement.propTypes = {
};

SearchappSearchbarElement.defaultProps = {
placeholderText: i18next.t("Search"),
placeholder: i18next.t("Search"),
iconName: "search",
iconColor: "green",
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
*/
& {
@import "./definitions/datepicker";
}

& {
@import "./definitions/page_header";
}

& {
@import "./definitions/page_footer";
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
@pageHeaderMinHeight: 6rem;
@pageHeaderLogoHeight:@pageHeaderMinHeight - 2rem;
@borderRadius: 0.3rem;
@pageheaderbottomborder:1px solid black;
@pageHeaderBottomBorder:1px solid black;
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = oarepo-ui
version = 5.0.104
version = 5.0.105
description = UI module for invenio 3.5+
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit d4d23b2

Please sign in to comment.