Untitled

 avatar
user_9363972
javascript
25 days ago
1.7 kB
4
Indexable
Never
 <FlatList
            data={Notes}
            keyExtractor={(item: any) => item._id}
            keyboardShouldPersistTaps={"handled"}
            ListHeaderComponent={
              <View>
                {/* <TextInput
                  placeholder="Search here"
                  style={styles.searchInput}
                  onChangeText={(text) => searchData(text)}
                  value={searchText}
                /> */}
              </View>
            }
            ListEmptyComponent={
              <View>
                <Text style={{ textAlign: "center" }}>Empty !</Text>
              </View>
            }
            showsVerticalScrollIndicator={false}
            renderItem={({ item }) => {
              return (
                <View style={styles.mainDataContainer}>
                  <TouchableOpacity

                  // onPress={() =>
                  //   navigation.navigate("EditNote", {
                  //     id: item.id,
                  //   })
                  // }
                  >
                    <View>
                      <Text>{item.description}</Text>
                    </View>
                    <Text>{dateFormat(item.createdAt)}</Text>
                  </TouchableOpacity>
                  {/* {isEdit ? (
                    <Checkbox
                      style={styles.checkBox}
                      onValueChange={() => {
                        setCheckBox(item.id, item.checkedStatus);
                      }}
                      value={item.checkedStatus}
                    />
                  ) : null} */}
                </View>
              );
            }}
          />
Leave a Comment