@lightningtv/solid
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -33,7 +33,8 @@ import { createEffect, on, createSignal, untrack, } from 'solid-js'; | ||
createEffect(on(activeElement, (currentFocusedElm, prevFocusedElm, prevFocusPath = []) => { | ||
const newFocusedElms = []; | ||
let current = currentFocusedElm; | ||
const fp = []; | ||
while (current) { | ||
if (!current.states.has('focus')) { | ||
// Always call Focus on activeElement in case user called setFocus() - Useful for Rows / Columns that have had children | ||
// changed and we can retrigger forwarding focus to newly added children | ||
if (!current.states.has('focus') || current === currentFocusedElm) { | ||
current.states.add('focus'); | ||
@@ -44,3 +45,2 @@ isFunc(current.onFocus) && | ||
current.onFocusChanged.call(current, true, currentFocusedElm, prevFocusedElm); | ||
newFocusedElms.push(current); | ||
} | ||
@@ -47,0 +47,0 @@ fp.push(current); |
{ | ||
"name": "@lightningtv/solid", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Lightning Renderer for Solid Universal", | ||
@@ -45,3 +45,3 @@ "type": "module", | ||
"dependencies": { | ||
"@lightningtv/core": "^1.0.2", | ||
"@lightningtv/core": "^1.0.3", | ||
"@solid-primitives/event-listener": "^2.3.3", | ||
@@ -48,0 +48,0 @@ "@solid-primitives/keyboard": "^1.2.8", |
@@ -131,3 +131,2 @@ import { | ||
) => { | ||
const newFocusedElms = []; | ||
let current = currentFocusedElm; | ||
@@ -137,3 +136,5 @@ | ||
while (current) { | ||
if (!current.states.has('focus')) { | ||
// Always call Focus on activeElement in case user called setFocus() - Useful for Rows / Columns that have had children | ||
// changed and we can retrigger forwarding focus to newly added children | ||
if (!current.states.has('focus') || current === currentFocusedElm) { | ||
current.states.add('focus'); | ||
@@ -149,3 +150,2 @@ isFunc(current.onFocus) && | ||
); | ||
newFocusedElms.push(current); | ||
} | ||
@@ -152,0 +152,0 @@ fp.push(current); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
156781
Updated@lightningtv/core@^1.0.3