react-native-sortable-list
react-native-sortable-list copied to clipboard
toggleRowActive not passed after setting manuallyActivateRows={true}
i see in the docs toggleRowActive should be passed to renderRow component if manuallyActivateRows is set to true. but i always get undefined when i log props. toggleRowActive i am using v0.0.22
after looking at the source i found out that the toggleRowActive is actually passed for children of renderRow component.. i think this is a change after some version .. so we don't have (cant) do renderRow = ({data,active, toggleRowActive) => ( <SingleRow ... />) anymore toggleRowActive is directly passed to "SingleRow" component ... you can close this issue .. but it documentation should be updated ..
Hai, So how do I access toggleRowActive from the child component? It always returns me undefined
as i have mentioned earlier this happens after some version (i dont know when its changed) but try updating to latest to and toggleRowActive will be passed to child component. (just dont pass anything to child and you will still get toggleRowActive in props)
Hello,
I have manuallyActivateRows={true} as well and cannot get toggleRowActive in props. What do you mean by 'just dont pass anything to child [...]'? I have tried the following but props don't include toggleRowActive method. renderRow={props => { console.log(props); return (....); }
@gitim Could you please prepare example in the doc how we can use toggleRowActive, because I (and many other users) have an issue with it - toggleRowActive is not passed to renderRow anymore. How we can extract it adequately? Thanks.