mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
fix: maintain multiline in cuesheet cells
This commit is contained in:
committed by
Carlos Valente
parent
7cd92ce5f7
commit
b51e7cbd2d
+4
@@ -4,3 +4,7 @@
|
|||||||
padding-top: 0.25em;
|
padding-top: 0.25em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.multiline {
|
||||||
|
white-space: break-spaces;
|
||||||
|
}
|
||||||
|
|||||||
+6
-2
@@ -2,6 +2,10 @@ import { PropsWithChildren } from 'react';
|
|||||||
|
|
||||||
import style from './GhostedText.module.scss';
|
import style from './GhostedText.module.scss';
|
||||||
|
|
||||||
export default function GhostedText({ children }: PropsWithChildren) {
|
interface GhostedTextProps {
|
||||||
return <div className={style.ghostedText}>{children}</div>;
|
multiline?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function GhostedText({ children, multiline }: PropsWithChildren<GhostedTextProps>) {
|
||||||
|
return <div className={`${style.ghostedText} ${multiline ? style.multiline : ''}`}>{children}</div>;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -143,7 +143,7 @@ function MakeMultiLineField({ row, column, table }: CellContext<ExtendedEntry, u
|
|||||||
|
|
||||||
const canWrite = column.columnDef.meta?.canWrite;
|
const canWrite = column.columnDef.meta?.canWrite;
|
||||||
if (!canWrite) {
|
if (!canWrite) {
|
||||||
return <GhostedText>{initialValue}</GhostedText>;
|
return <GhostedText multiline>{initialValue}</GhostedText>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <MultiLineCell initialValue={initialValue as string} handleUpdate={update} />;
|
return <MultiLineCell initialValue={initialValue as string} handleUpdate={update} />;
|
||||||
|
|||||||
Reference in New Issue
Block a user