chore: add emitter to sheet Cell (#1712)

This commit is contained in:
Tobias Åström
2025-04-07 10:27:47 +02:00
committed by GitHub
parent 56214c5b54
commit 9e8f7cf483

View File

@@ -1,4 +1,5 @@
import React, { useEffect, useState, useContext, useMemo, forwardRef, useImperativeHandle, useRef } from 'react';
import EventEmitter from 'node-event-emitter';
import useLayout from '../hooks/useLayout';
import getObject from '../object/get-object';
import Cell from './Cell';
@@ -27,6 +28,8 @@ function getCellRenderer(cell, halo, initialSnOptions, initialSnPlugins, initial
style.padding = '4px';
}
const emitter = new EventEmitter();
return (
<div style={style} key={cell.model.id}>
<Cell
@@ -38,6 +41,7 @@ function getCellRenderer(cell, halo, initialSnOptions, initialSnPlugins, initial
initialSnPlugins={initialSnPlugins}
initialError={initialError}
onMount={onMount}
emitter={emitter}
navigation={navigation}
onError={onError}
/>