Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 1e5fde8

Browse files
committed
alignment
1 parent 0487f8d commit 1e5fde8

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

src/components/portals/SelectPortal.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ const SelectPortal = (popperProps: CellComponentProps) => {
9494
menuPortalTarget={activeDocument.body}
9595
menuPlacement="auto"
9696
menuShouldBlockScroll={true}
97-
className="react-select-container"
98-
classNamePrefix="react-select"
97+
className={c("text-align-center")}
9998
key={`${tableColumn.key}-select-open`}
10099
/>
101100
</div>
@@ -109,7 +108,7 @@ const SelectPortal = (popperProps: CellComponentProps) => {
109108
) : (
110109
/* Current value of the select */
111110
<div
112-
className="cell-padding d-flex cursor-default align-items-center flex-1"
111+
className={`cell-padding d-flex ${c("text-align-center")}`}
113112
onClick={() => setShowSelect(true)}
114113
style={{ width: column.getSize() }}
115114
>

src/components/portals/TagsPortal.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ const TagsPortal = (tagsProps: CellComponentProps) => {
107107
onBlur={() => setShowSelectTags(false)}
108108
onChange={handleOnChange}
109109
menuPortalTarget={activeDocument.body}
110+
className={c("tags-container text-align-center")}
110111
menuPlacement="auto"
111112
menuShouldBlockScroll={true}
112-
className="react-select-container"
113-
classNamePrefix="react-select"
114113
/>
115114
</div>
116115
);
@@ -121,9 +120,7 @@ const TagsPortal = (tagsProps: CellComponentProps) => {
121120
? TagsForm()
122121
: tagsState && (
123122
<div
124-
className={
125-
c("tags-container") + " cell-padding d-flex flex-wrap-wrap"
126-
}
123+
className={c("tags-container text-align-center")}
127124
onClick={() => setShowSelectTags(true)}
128125
style={{ width: column.getSize() }}
129126
>

src/components/styles/TextAlignmentSelector.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ import FormatAlignLeftIcon from "@mui/icons-material/FormatAlignLeft";
33
import FormatAlignCenterIcon from "@mui/icons-material/FormatAlignCenter";
44
import FormatAlignRightIcon from "@mui/icons-material/FormatAlignRight";
55
import FormatAlignJustifyIcon from "@mui/icons-material/FormatAlignJustify";
6-
import WrapTextIcon from "@mui/icons-material/WrapText";
76
import Stack from "@mui/material/Stack";
87
import ToggleButton from "@mui/material/ToggleButton";
98
import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
109
import { TextAlignmentProps } from "cdm/StyleModel";
1110
import { COLUMN_ALIGNMENT_OPTIONS, StyleVariables } from "helpers/Constants";
12-
import Divider from "@mui/material/Divider";
1311

1412
export default function TextAlignmentSelector(props: TextAlignmentProps) {
1513
const { modal, columnKey, currentAlignment } = props;

src/parsers/RowDatabaseFieldsToFile.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import { DataviewService } from "services/DataviewService";
66
export const parseFrontmatterFieldsToString = (databaseFields: RowDatabaseFields, deletedColumn?: string): string => {
77
const frontmatterFields = databaseFields.frontmatter;
88
delete frontmatterFields[deletedColumn];
9-
let array: string[] = [];
9+
let stringify: string = "";
1010
if (Object.keys(frontmatterFields).length > 0) {
1111
const stringifiedFrontmatter = stringifyYaml(frontmatterFields);
12-
console.log(stringifiedFrontmatter);
13-
array = [`---`, stringifiedFrontmatter, `---`];
12+
stringify = `---\n${stringifiedFrontmatter}---`;
1413
}
15-
return array.join('\n');
14+
return stringify;
1615
}
1716

1817
export const parseInlineFieldsToString = (inlineFields: RowDatabaseFields): string => {

0 commit comments

Comments
 (0)