Skip to content

Commit

Permalink
community: added autofocus prop to CommunitySelectionSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
ptamarit committed Oct 18, 2024
1 parent aa67a1a commit cbf7fdf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class CommunitySelectionSearch extends Component {
isInitialSubmission,
CommunityListItem,
pagination,
autofocus,
} = this.props;

const searchApi = new InvenioSearchApi(selectedSearchApi);
Expand Down Expand Up @@ -125,7 +126,7 @@ export class CommunitySelectionSearch extends Component {
>
<SearchBar
placeholder={toggleText}
autofocus
autofocus={autofocus}
actionProps={{
"icon": "search",
"content": null,
Expand Down Expand Up @@ -178,11 +179,13 @@ CommunitySelectionSearch.propTypes = {
isInitialSubmission: PropTypes.bool,
CommunityListItem: PropTypes.elementType,
pagination: PropTypes.bool,
autofocus: PropTypes.bool,
};

CommunitySelectionSearch.defaultProps = {
isInitialSubmission: true,
pagination: true,
autofocus: true,
CommunityListItem: CommunityListItem,
apiConfigs: {
allCommunities: {
Expand Down

0 comments on commit cbf7fdf

Please sign in to comment.