debug overlay

Reviewed By: yungsters

Differential Revision: D4534822

fbshipit-source-id: ceef5bc5c0dc8cdc0d3927e198273b4411045bde
This commit is contained in:
Spencer Ahrens
2017-02-13 12:53:59 -08:00
committed by Facebook Github Bot
parent 12b228c5d9
commit 0a86c1cb15
2 changed files with 75 additions and 4 deletions

View File

@@ -52,6 +52,7 @@ class FlatListExample extends React.PureComponent {
state = {
data: genItemData(1000),
debug: false,
horizontal: false,
filterText: '',
fixedHeight: true,
@@ -90,6 +91,7 @@ class FlatListExample extends React.PureComponent {
{renderSmallSwitchOption(this, 'horizontal')}
{renderSmallSwitchOption(this, 'fixedHeight')}
{renderSmallSwitchOption(this, 'logViewable')}
{renderSmallSwitchOption(this, 'debug')}
</View>
</View>
<FlatList
@@ -98,6 +100,7 @@ class FlatListExample extends React.PureComponent {
ItemComponent={this._renderItemComponent}
SeparatorComponent={SeparatorComponent}
data={filteredData}
debug={this.state.debug}
disableVirtualization={!this.state.virtualized}
getItemLayout={this.state.fixedHeight ? this._getItemLayout : undefined}
horizontal={this.state.horizontal}
@@ -105,9 +108,9 @@ class FlatListExample extends React.PureComponent {
legacyImplementation={false}
numColumns={1}
onRefresh={() => alert('onRefresh: nothing to refresh :P')}
refreshing={false}
onViewableItemsChanged={this._onViewableItemsChanged}
ref={this._captureRef}
refreshing={false}
shouldItemUpdate={this._shouldItemUpdate}
/>
</UIExplorerPage>