@lightningtv/solid
Advanced tools
Comparing version 2.6.2 to 2.6.3
@@ -19,4 +19,9 @@ import { View, combineStyles } from '@lightningtv/solid'; | ||
const scroll = withScrolling(false); | ||
function scrollToIndex(index) { | ||
this.selected = index; | ||
scroll(index, this); | ||
this.setFocus(); | ||
} | ||
export const Column = (props) => { | ||
return (<View {...props} onUp={/* @once */chainFunctions(props.onUp, onUp)} onDown={/* @once */chainFunctions(props.onDown, onDown)} selected={props.selected || 0} forwardFocus={onGridFocus} onFocus={ | ||
return (<View {...props} onUp={/* @once */chainFunctions(props.onUp, onUp)} onDown={/* @once */chainFunctions(props.onDown, onDown)} selected={props.selected || 0} scrollToIndex={scrollToIndex} forwardFocus={onGridFocus} onFocus={ | ||
/* @once */ chainFunctions(props.onFocus, props.onSelectedChanged && handleOnSelect(props.onSelectedChanged))} onLayout={ | ||
@@ -23,0 +28,0 @@ /* @once */ |
@@ -18,5 +18,10 @@ import { combineStyles, View } from '@lightningtv/solid'; | ||
const scroll = withScrolling(true); | ||
function scrollToIndex(index) { | ||
this.selected = index; | ||
scroll(index, this); | ||
this.setFocus(); | ||
} | ||
export const Row = (props) => { | ||
return (<View {...props} selected={props.selected || 0} onLeft={/* @once */chainFunctions(props.onLeft, onLeft)} onRight={/* @once */chainFunctions(props.onRight, onRight)} onFocus={ | ||
/* @once */ chainFunctions(props.onFocus, props.onSelectedChanged && handleOnSelect(props.onSelectedChanged))} forwardFocus={onGridFocus} onLayout={ | ||
/* @once */ chainFunctions(props.onFocus, props.onSelectedChanged && handleOnSelect(props.onSelectedChanged))} forwardFocus={onGridFocus} scrollToIndex={scrollToIndex} onLayout={ | ||
/* @once */ | ||
@@ -23,0 +28,0 @@ props.selected ? chainFunctions(props.onLayout, scroll) : props.onLayout} onSelectedChanged={ |
{ | ||
"name": "@lightningtv/solid", | ||
"version": "2.6.2", | ||
"version": "2.6.3", | ||
"description": "Lightning Renderer for Solid Universal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
236698
3353