Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGB committed Sep 8, 2022
1 parent be0b2e9 commit b704a7e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 10 deletions.
12 changes: 11 additions & 1 deletion docs/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# 2.3.7
# 2.4.0
*Published on 2022/09/08*
### Shiny new things
- Totally renewed row context menu! Now wraps the obsidian context menu, so you can use all the plugins that add items to it(rename and delete file included as custom options too) [ISSUE#152](https://github.com/RafaelGB/obsidian-db-folder/issues/152)
- Created and modified columns now is rendered as daily link note using the complete date as alias [ISSUE#144](https://github.com/RafaelGB/obsidian-db-folder/issues/144)
### Improved
- Global search now ignore cases [ISSUE#340](https://github.com/RafaelGB/obsidian-db-folder/issues/340)
- File column is ordered alphabetically using filename instead of path with sort options [ISSUE#335](https://github.com/RafaelGB/obsidian-db-folder/issues/335)
- Checkbox edition save boolean values instead of 1 or 0 [ISSUE#158](https://github.com/RafaelGB/obsidian-db-folder/issues/158)
### Visual
- Tasks aligned to the left properly
- Open tags cell on the bottom of the table is displayed properly [ISSUE#139](https://github.com/RafaelGB/obsidian-db-folder/issues/139)
### No longer broken
- new yaml breaker conditions added (>)
- Edit a cell in a page out of the first one does not reset the pagination anymore [ISSUE#338](https://github.com/RafaelGB/obsidian-db-folder/issues/338)
# 2.3.6
*Published on 2022/09/07*
### Improved
Expand Down
2 changes: 1 addition & 1 deletion manifest-beta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "dbfolder",
"name": "DB Folder",
"version": "2.3.6",
"version": "2.4.0",
"minAppVersion": "0.15.9",
"description": "Folder with the capability to store and retrieve data from a folder like database",
"author": "RafaelGB",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "dbfolder",
"name": "DB Folder",
"version": "2.3.6",
"version": "2.4.0",
"minAppVersion": "0.15.9",
"description": "Folder with the capability to store and retrieve data from a folder like database",
"author": "RafaelGB",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-dbfolder",
"version": "2.3.6",
"version": "2.4.0",
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
"main": "main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const defaultColumn: Partial<ColumnDef<RowDataType>> = {
cell: DefaultCell,
header: DefaultHeader,
enableResizing: true,
sortingFn: "basic",
sortingFn: "alphanumeric",
};

/**
Expand Down
5 changes: 3 additions & 2 deletions src/components/cellTypes/CheckboxCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ function CheckboxCell(props: CellComponentProps) {

const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const newValue = event.target.checked;
console.log("newValue", newValue);
// save on disk
dataActions.updateCell(
row.index,
column.columnDef as TableColumn,
newValue,
newValue ? "true" : "false",
columnsInfo.getAllColumns(),
configInfo.getLocalSettings()
);
Expand All @@ -31,7 +32,7 @@ function CheckboxCell(props: CellComponentProps) {
<div key={`checkbox-div-${row.index}`} className={`${c("checkbox")}`}>
<input
type="checkbox"
checked={checkboxRow[column.id] as boolean}
checked={checkboxRow[column.id] === "true"}
key={`checkbox-input-${row.index}`}
onChange={handleChange}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/services/DataviewService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ class DataviewProxy {
}
}

private parseToBoolean(wrapped: WrappedLiteral): boolean {
private parseToBoolean(wrapped: WrappedLiteral): string {
if (wrapped.type === 'boolean') {
return wrapped.value;
return wrapped.value ? 'true' : 'false';
} else {
const adjustedValue = this.getDataviewAPI().value.toString(wrapped.value);
return adjustedValue === 'true' || adjustedValue === '1';
return adjustedValue === 'true' ? "true" : "false";
}
}

Expand Down

0 comments on commit b704a7e

Please sign in to comment.