Page jumps with these Dataview queries

So I understand that most dv queries rely on data from external notes, and when these external notes change the data view refreshes. Recently I added some queries to my daily note which use dv.view and the second checks if this note contains a tag then print something.

dv.view("Where I Worked")
if (dv.current().file.tags.includes("#📓/Counseling")){
	dv.paragraph("# Counseling Notes\n----");

After I added these queries I noticed that they keep popping in and out moving the text that I am currently reading / writing in and out of view. This makes dealing with these daily notes very annoying and I have had to resort to viewing the note in source mode.

Is there something I can do either to the queries, or the data view settings to fix this? Or is this a bug to report on the dataview GitHub?

When you add a query which might change length/content over where you’re reading/writing this might indeed happen. Don’t think there’s a lot todo about that, besides possibly change the timeout for when dataview refreshes, to make it not refresh as often.

This can be done in Settings > Dataview (View settings) > Referesh Interval, so you could try increasing that setting.

Another option, could be to move the queries further down in your note, if that is viable for you.

I don’t think this is considered a bug, but it could be very annoying, for sure.

1 Like

I had a feeling that might be the case. The issue makes sense, two of the queries check to see if the content of the file has changed, which it is as I am writing in the file. So the queries update and because they updated the query disappears and reprints. So the page moves up and down.

I am not sure why the dv.view flashes as it is looking to see if another file has changed. And I have not changed that file since we stopped our last thread.

But I will try changing the time. It mostly seems to be a problem on my phone.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.