mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 11:56:18 -05:00
Global search waits for selection before submitting.
This commit is contained in:
parent
377c69e8a7
commit
3ad7b8af00
9 changed files with 141 additions and 169 deletions
|
|
@ -287,10 +287,10 @@ const ZimsRefreshWarning = () => {
|
|||
</Message>;
|
||||
}
|
||||
|
||||
export const ZimSearchView = ({estimates, loading}) => {
|
||||
export const ZimSearchView = ({suggestions, loading}) => {
|
||||
const [activeIndex, setActiveIndex] = React.useState(null);
|
||||
const {searchStr, activeTags, setTags} = useSearch();
|
||||
const {zimsEstimates} = estimates;
|
||||
const {zimsEstimates} = suggestions;
|
||||
|
||||
const handleClick = (index, activeIndex_) => {
|
||||
setActiveIndex(index === activeIndex_ ? -1 : index);
|
||||
|
|
@ -308,7 +308,11 @@ export const ZimSearchView = ({estimates, loading}) => {
|
|||
onClick={handleClick}
|
||||
/>);
|
||||
} else if (loading) {
|
||||
body = <Loader active={true}/>;
|
||||
body = <AccordionContent>
|
||||
<Segment placeholder>
|
||||
<Loader active={true}/>
|
||||
</Segment>
|
||||
</AccordionContent>;
|
||||
} else if (_.isEmpty(zimsEstimates)) {
|
||||
body = <ZimsRefreshWarning/>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue