Skip to content

Commit c71de5d

Browse files
authored
Discourse Overlay no results fix (Closes #278) (#280)
* setLoading false if results * remove autofocus on popover * 1.33.1
1 parent 6675ed7 commit c71de5d

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "query-builder",
3-
"version": "1.33.0",
3+
"version": "1.33.1",
44
"description": "Introduces new user interfaces for building queries in Roam",
55
"main": "./build/main.js",
66
"author": {

src/components/DiscourseContext.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,10 @@ export const ContextContent = ({ uid, results, args }: Props) => {
327327
useEffect(() => {
328328
if (!results) {
329329
onRefresh();
330+
} else {
331+
setLoading(false);
330332
}
331-
}, [onRefresh, results]);
333+
}, [onRefresh, results, setLoading]);
332334
const [tabId, setTabId] = useState(0);
333335
const [groupByTarget, setGroupByTarget] = useState(false);
334336
return queryResults.length ? (

src/components/DiscourseContextOverlay.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ const DiscourseContextOverlay = ({ tag, id }: { tag: string; id: string }) => {
161161
}, [refresh, getInfo]);
162162
return (
163163
<Popover
164+
autoFocus={false}
164165
content={
165166
<div
166167
className="roamjs-discourse-context-popover"

0 commit comments

Comments
 (0)