-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit the number of displayed notes #69
Labels
enhancement
New feature or request
Comments
You want to limit the results? |
Hi,
I thought I saw something about limiting the number of results, but I didn’t go through the whole code so maybe it’s not relevant :
// Get all tags title as array for a note id
export async function getTags(noteId): Promise<string[]> {
const tagNames: string[] = [];
let pageNum = 1;
do {
try {
var tags = await joplin.data.get(["notes", noteId, "tags"], {
fields: "id, title, parent_id",
limit: 50,
page: pageNum++,
});
} catch (e) {
logging.error("getTags " + e);
tagNames.push("n/a");
return tagNames;
}
for (const tag of tags.items) {
tagNames.push(tag.title);
}
=> https://github.com/JackGruber/joplin-plugin-note-overview/blob/master/src/noteoverview.ts
But yes, I would like to limit the number of results.
A use case would be to display only the last 5 edited notes.
Thanks!
… Le 18 déc. 2023 à 16:25, JackGruber ***@***.***> a écrit :
You want to limit the results?
Because at the moment there is no hardcoded limit or configuration option, all matching notes from a query would be displayed.
—
Reply to this email directly, view it on GitHub <#69 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEEH3YBJQGJGX3QXSALQGQDYKBN53AVCNFSM6AAAAABAZM4G5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRQHAYDKNZTGI>.
You are receiving this because you authored the thread.
|
No this code fetch all needed Tags from the note in blocks of 50 in each loop run. I'll see if I add a parameter in the next release
|
Ok, thanks much appreciated.
Best
… Le 18 déc. 2023 à 16:38, JackGruber ***@***.***> a écrit :
No this code fetch all needed Tags from the note in blocks of 50 in each loop run.
I'll see if I add a parameter in the next release
limit: 5
—
Reply to this email directly, view it on GitHub <#69 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEEH3YHL5LG5JPJEBVU26KDYKBPNTAVCNFSM6AAAAABAZM4G5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRQHAZTQNZQGE>.
You are receiving this because you authored the thread.
|
JackGruber
added a commit
that referenced
this issue
Dec 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Thank you for this amazing plugin,
I was wondering if there were a way to apply a limit to the number of displayed notes resulting from the search ? I noticed that the limit was hardcoded up to 50 but couldn't find any option in the yaml config.
Thank you in advance!
The text was updated successfully, but these errors were encountered: