mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
chore: add emitter to sheet Cell (#1712)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import React, { useEffect, useState, useContext, useMemo, forwardRef, useImperativeHandle, useRef } from 'react';
|
import React, { useEffect, useState, useContext, useMemo, forwardRef, useImperativeHandle, useRef } from 'react';
|
||||||
|
import EventEmitter from 'node-event-emitter';
|
||||||
import useLayout from '../hooks/useLayout';
|
import useLayout from '../hooks/useLayout';
|
||||||
import getObject from '../object/get-object';
|
import getObject from '../object/get-object';
|
||||||
import Cell from './Cell';
|
import Cell from './Cell';
|
||||||
@@ -27,6 +28,8 @@ function getCellRenderer(cell, halo, initialSnOptions, initialSnPlugins, initial
|
|||||||
style.padding = '4px';
|
style.padding = '4px';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const emitter = new EventEmitter();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={style} key={cell.model.id}>
|
<div style={style} key={cell.model.id}>
|
||||||
<Cell
|
<Cell
|
||||||
@@ -38,6 +41,7 @@ function getCellRenderer(cell, halo, initialSnOptions, initialSnPlugins, initial
|
|||||||
initialSnPlugins={initialSnPlugins}
|
initialSnPlugins={initialSnPlugins}
|
||||||
initialError={initialError}
|
initialError={initialError}
|
||||||
onMount={onMount}
|
onMount={onMount}
|
||||||
|
emitter={emitter}
|
||||||
navigation={navigation}
|
navigation={navigation}
|
||||||
onError={onError}
|
onError={onError}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user