-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
[Bug]: sort doesn't apply in date column #371
Labels
bug
Something isn't working
Comments
DannyHatcher-Git
added
bug
Something isn't working
triage
Issue not tagged yet. talking to the user
labels
Sep 12, 2022
Try updating to the latest version 2.5.3 and see if the issue remains. |
RafaelGB
added
wontfix
This will not be worked on
and removed
bug
Something isn't working
labels
Sep 12, 2022
Yes, thankyou! I checked for updates yesterday 🤷♂️ How do I get a notification about updates? |
You can watch/unwatch the repository to be notified |
You can install something like https://github.com/manosim/gitify to make it easier |
RafaelGB
added
bug
Something isn't working
and removed
wontfix
This will not be worked on
triage
Issue not tagged yet. talking to the user
labels
Sep 12, 2022
resolved with a custom function import { Row, SortingFn } from "@tanstack/react-table";
import { RowDataType } from "cdm/FolderModel";
import { LocalSettings } from "cdm/SettingsModel";
import { InputType } from "helpers/Constants";
import { Literal } from "obsidian-dataview";
import { DataviewService } from "services/DataviewService";
const dbfolderColumnSortingFn: (
ddbbConfig: LocalSettings
) => SortingFn<RowDataType> =
(ddbbConfig: LocalSettings) =>
(
rowA: Row<RowDataType>,
rowB: Row<RowDataType>,
columnId: string
): number => {
const a = DataviewService.parseLiteral(
rowA.getValue<Literal>(columnId),
InputType.MARKDOWN,
ddbbConfig,
true
)
.toString()
.toLowerCase();
const b = DataviewService.parseLiteral(
rowB.getValue<Literal>(columnId),
InputType.MARKDOWN,
ddbbConfig,
true
)
.toString()
.toLowerCase();
return a === b ? 0 : a > b ? 1 : -1;
};
export default dbfolderColumnSortingFn; |
Screen.Recording.2022-09-12.at.20.29.34.mov |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Contact Details
danny@dannyhatcher.com
What happened?
When sorting by a date property (deadline) there was no change in the display order.
What platform were you using?
Desktop
Version of the plugin
2.5.1
Relevant log output
No idea what I am copy and pasting. This is what I see Uncaught (in promise) Failed to index file: Notes/database.md: Error: Cannot index file, since it has no Obsidian file metadata. 2plugin:dbfolder:10 Uncaught Error: Minified React error #200; visit https://reactjs.org/docs/error-decoder.html?invariant=200 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at Object.Qr.Gr.createPortal (plugin:dbfolder:10:125962) at zU (plugin:dbfolder:238:357774) at Ei (plugin:dbfolder:10:62177) at Os (plugin:dbfolder:10:73445) at Cl (plugin:dbfolder:10:119595) at yc (plugin:dbfolder:10:107733) at vc (plugin:dbfolder:10:107661) at gc (plugin:dbfolder:10:107524) at ac (plugin:dbfolder:10:104331) at lc (plugin:dbfolder:10:104720)
The text was updated successfully, but these errors were encountered: