Skip to content

Commit

Permalink
Sort autosuggest groups alphabetically.
Browse files Browse the repository at this point in the history
  • Loading branch information
boonebgorges committed Sep 24, 2018
1 parent ffb7582 commit 42732bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions assets/js/components/GroupSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ class GroupSearch extends React.Component {
path: wp.url.addQueryArgs(
`/buddypress/v1/groups`,
{
per_page: 10,
per_page: 25,
search: searchTerm,
orderby: 'name',
order: 'asc',
}
),
} ) )
Expand All @@ -32,7 +34,6 @@ class GroupSearch extends React.Component {
value: group.id,
} )

// todo
const populateSelectionsCallback = (callback) => {
if ( 0 === selectedGroupIds.length ) {
callback( [] )
Expand Down
7 changes: 4 additions & 3 deletions dist/app.build.js
Original file line number Diff line number Diff line change
Expand Up @@ -31623,8 +31623,10 @@ class GroupSearch extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Componen

const searchRequest = searchTerm => wp.apiFetch({
path: wp.url.addQueryArgs(`/buddypress/v1/groups`, {
per_page: 10,
search: searchTerm
per_page: 25,
search: searchTerm,
orderby: 'name',
order: 'asc'
})
});

Expand All @@ -31633,7 +31635,6 @@ class GroupSearch extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Componen
value: group.id
});

// todo
const populateSelectionsCallback = callback => {
if (0 === selectedGroupIds.length) {
callback([]);
Expand Down

0 comments on commit 42732bb

Please sign in to comment.