Skip to content

Commit cbf7fdf

Browse files
committed
community: added autofocus prop to CommunitySelectionSearch
1 parent aa67a1a commit cbf7fdf

File tree

1 file changed

+4
-1
lines changed
  • invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/components/CommunitySelectionModal

1 file changed

+4
-1
lines changed

invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/components/CommunitySelectionModal/CommunitySelectionSearch.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export class CommunitySelectionSearch extends Component {
5050
isInitialSubmission,
5151
CommunityListItem,
5252
pagination,
53+
autofocus,
5354
} = this.props;
5455

5556
const searchApi = new InvenioSearchApi(selectedSearchApi);
@@ -125,7 +126,7 @@ export class CommunitySelectionSearch extends Component {
125126
>
126127
<SearchBar
127128
placeholder={toggleText}
128-
autofocus
129+
autofocus={autofocus}
129130
actionProps={{
130131
"icon": "search",
131132
"content": null,
@@ -178,11 +179,13 @@ CommunitySelectionSearch.propTypes = {
178179
isInitialSubmission: PropTypes.bool,
179180
CommunityListItem: PropTypes.elementType,
180181
pagination: PropTypes.bool,
182+
autofocus: PropTypes.bool,
181183
};
182184

183185
CommunitySelectionSearch.defaultProps = {
184186
isInitialSubmission: true,
185187
pagination: true,
188+
autofocus: true,
186189
CommunityListItem: CommunityListItem,
187190
apiConfigs: {
188191
allCommunities: {

0 commit comments

Comments
 (0)