Skip to content

Can't add property 4, object is not extensible #18

@kiwijus

Description

@kiwijus

I get the following error when using TabLayoutAndroid and React-native navigator. The error occurs when I try to push to another route. I have the following code:


<View>
              <ButtonAndroid
                text='Custom Button'
                onPress={

                  () => {
                      this.props.navigator.push(anotherRoute());
                  }
                }
                />
        </View>
        <View style={{ flex: 1 }}>
          <TabLayoutAndroid style={{ height: 40 }} backgroundColor='#F9F9F9' indicatorTabColor='#000000'
            indicatorTabHeight={2} scrollable={true} center={false} >
            <TabAndroid text='All' textSize={14} textColor="#000000" selectedTextColor='#000000'
              icon='ic_home_black_24dp' scrollEnabled={false} iconPosition='left'>
              <Text>I'm the firstTab content!</Text>
            </TabAndroid>
            <TabAndroid text='Online' textSize={14} textColor="#000000" selectedTextColor='#000000'
              icon='ic_important_devices_black_24dp' scrollEnabled={false}  iconPosition='left'>
              <Text>I'm the second Tab content!</Text>
            </TabAndroid>
            <TabAndroid text='Pending' textSize={14} textColor="#000000" selectedTextColor='#000000'
              icon='ic_important_devices_black_24dp' iconPosition='left'>
              <Text>I'm the third Tab content!</Text>
            </TabAndroid>
            <TabAndroid text='Blocked' textSize={14} textColor="#000000" selectedTextColor='#000000'
              icon='ic_important_devices_black_24dp' iconPosition='left'>
              <Text>I'm the third Tab content!</Text>
            </TabAndroid>
          </TabLayoutAndroid>

        </View>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions