react-native-sortable-list icon indicating copy to clipboard operation
react-native-sortable-list copied to clipboard

toggleRowActive not passed after setting manuallyActivateRows={true}

Open Abenezer opened this issue 7 years ago • 5 comments

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

Abenezer avatar May 08 '18 22:05 Abenezer

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 ..

Abenezer avatar May 08 '18 23:05 Abenezer

Hai, So how do I access toggleRowActive from the child component? It always returns me undefined

theebi avatar May 28 '18 05:05 theebi

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)

Abenezer avatar Jun 04 '18 00:06 Abenezer

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 (....); }

PoppyAnc avatar Sep 04 '18 07:09 PoppyAnc

@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.

ivankdev avatar Jan 14 '20 13:01 ivankdev