|
|
|
@ -25,7 +25,7 @@ const memberSorts = { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export function MembersDropdown(props) { |
|
|
|
|
const { token, name, onChange, value, initial } = props; |
|
|
|
|
const { token, name, onChange, value, initial, autofocus } = props; |
|
|
|
|
const [response, setResponse] = useState({ results: [] }); |
|
|
|
|
const searchDefault = {seq: 0, q: initial || '', sort: 'newest_active'}; |
|
|
|
|
const [search, setSearch] = useState(searchDefault); |
|
|
|
@ -61,6 +61,9 @@ export function MembersDropdown(props) { |
|
|
|
|
placeholder='Search for Member' |
|
|
|
|
onChange={onChange} |
|
|
|
|
onSearchChange={(e, v) => setSearch({seq: parseInt(e.timeStamp), q: v.searchQuery, sort: 'newest_active'})} |
|
|
|
|
|
|
|
|
|
searchInput={{ autoFocus: autofocus }} |
|
|
|
|
openOnFocus={!autofocus} |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
); |
|
|
|
|