mirror of
https://github.com/cpvalente/ontime.git
synced 2026-07-26 10:38:55 +00:00
fix: maintain multiline in cuesheet cells
This commit is contained in:
committed by
Carlos Valente
parent
0ab4abfcfe
commit
304832ecde
+4
@@ -4,3 +4,7 @@
|
||||
padding-top: 0.25em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.multiline {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
|
||||
+6
-2
@@ -2,6 +2,10 @@ import { PropsWithChildren } from 'react';
|
||||
|
||||
import style from './GhostedText.module.scss';
|
||||
|
||||
export default function GhostedText({ children }: PropsWithChildren) {
|
||||
return <div className={style.ghostedText}>{children}</div>;
|
||||
interface GhostedTextProps {
|
||||
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;
|
||||
if (!canWrite) {
|
||||
return <GhostedText>{initialValue}</GhostedText>;
|
||||
return <GhostedText multiline>{initialValue}</GhostedText>;
|
||||
}
|
||||
|
||||
return <MultiLineCell initialValue={initialValue as string} handleUpdate={update} />;
|
||||
|
||||
Reference in New Issue
Block a user