Ver Fonte

Bugfix: Payload added to Add Event Listener.

lfabl há 2 anos atrás
pai
commit
eb26a68a27
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/core/index.tsx

+ 1 - 1
src/core/index.tsx

@@ -59,7 +59,7 @@ class NCoreContext<T extends {} | undefined, K extends ConfigType<T>> {
     };
 
     // event listeners:
-    addEventListener = (key: string, func: (state: T) => void) => {
+    addEventListener = (key: string, func: (payload: any, state: T) => void) => {
         this.subscribers.push({
             func,
             key