This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ export default function DefaultCell(cellProperties: Cell) {
5050 LOGGER . debug (
5151 `default useEffect. dataType:${ dataType } - value: ${ contextValue . value } cellValue: ${ cellValue } `
5252 ) ;
53+ if ( dirtyCell ) {
54+ // End useEffect
55+ return ;
56+ }
5357 switch ( dataType ) {
5458 case DataTypes . TASK :
5559 // Check if there are tasks in the cell
@@ -70,13 +74,16 @@ export default function DefaultCell(cellProperties: Cell) {
7074
7175 break ;
7276 case DataTypes . MARKDOWN :
73- containerCellRef . current . innerHTML = "" ;
74- renderMarkdown (
75- cellProperties ,
76- cellValue . toString ( ) ,
77- containerCellRef . current ,
78- 5
79- ) ;
77+ case DataTypes . TEXT :
78+ if ( containerCellRef . current !== null ) {
79+ containerCellRef . current . innerHTML = "" ;
80+ renderMarkdown (
81+ cellProperties ,
82+ cellValue . toString ( ) ,
83+ containerCellRef . current ,
84+ 5
85+ ) ;
86+ }
8087 break ;
8188 default :
8289 // do nothing
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export function CheckboxCell(props: CheckboxProps) {
1717 const note : NoteInfo = ( cellProperties . row . original as any ) . __note__ ;
1818 /** state of cell value */
1919 const { contextValue, setContextValue } = useContext ( CellContext ) ;
20- const [ checked , setChecked ] = useState ( contextValue . value === 1 ) ;
20+ const [ checked , setChecked ] = useState ( contextValue . value . toString ( ) === "1" ) ;
2121 const handleChange = ( event : React . ChangeEvent < HTMLInputElement > ) => {
2222 const newValue = event . target . checked ? 1 : 0 ;
2323 // save on disk
You can’t perform that action at this time.
0 commit comments