Topener / nl.fokkezb.pullToRefresh

Widget to implement a table pull-to-refresh header in Titanium Alloy
184 stars 60 forks source link

For unknown reason, listView wasn't the first child element, but the second, even though there was only one, #44

Closed Topener closed 9 years ago

Topener commented 9 years ago

The widget didn't detect my listView because it came in 2nd. The first child was the template. Might have something to do with the <require>

My code:

            <Widget id="ptr" src="nl.fokkezb.pullToRefresh" onRelease="updateStation">

                <ListView defaultItemTemplate="departure" onItemclick="itemClick">

                    <Templates>
                        <Require src="Departure"></Require>
                    </Templates>

                    <ListSection
                        dataCollection="departures"
                        dataTransform="parseDeparture"
                        dataFunction="refreshListView"
                        >
                    </ListSection>

                </ListView>
            </Widget>

I adjusted the widget in my case. Perhaps a proper change would be to loop through the child elements, find the first ListItem/TableView and attach itself to that?

ps: my listItem is missing here for example sake ;)

DwainsWorld commented 9 years ago

@Topener If the issue persists can you update your widget with the master branch. I submitted a PR for this exact issue 8 days ago which was accepted :+1:

FokkeZB commented 9 years ago

Updated NPM version and GitHub release to 2.1.1