Closed TrustOne closed 5 years ago
Hi @TrustOne , Thanks for reaching us. We’re gonna investigate it. And we’ll update it soon. Feel free to contact us if you need anything.
Hi @TrustOne , Thanks for reaching us. We’re gonna investigate it. And we’ll update it soon. Feel free to contact us if you need anything.
thanks for fastest reply, I'll wait and hava a nice coding today
Hi @TrustOne , Could you share your dynamic data structure?
Hi @TrustOne , Could you share your dynamic data structure?
Sure ^^ here is the Code, and plz look at the this.commonRef.get().then(async function(doc) code that is a web database promise function ` this.commonRef.get().then(async function(doc) { if (doc.exists) { const Big_category = await doc.data().Big_category; console.log(Big_category); Big_category.forEach(async (each,index) => { await BigCategory.push ({ Name : each, Value : each, Code : doc.id, Id : index, }); console.log(index); console.log(BigCategory); const json_string = JSON.stringify(BigCategory); console.log(json_string); this.setState({json_string}); })
}
`
Is Your PickerModal "data" property of "json_string"? If it's true, it's must be JSON object not a stringified. Additionaly, Could you share output of the this line "console.log(BigCategory);"?
Is Your PickerModal "data" property of "json_string"? If it's true, it's must be JSON object not a stringified. Additionaly, Could you share output of the this line "console.log(BigCategory);"?
Sorry, I tested yesterday, and that time I checked in many ways including JSON,Object style, but both never worked I remember. But I may be wrong, I'll check and tell you again. later.
But make sure what I told, Firebase get data from database in Google, dynamically. it hopefully work
Hi @TrustOne Since there’s no activity for a long time on this issue, i’m closing it. If the problem continues, do not hesitate to contact us.
I'm going to set items={data} which is not static.
I'm getting data from firebase as soon as stated.
The problem is, the data I made, was no problem.
but If I put as value not file, It doesn't work,
here is My full file
` import React, { Component, useState } from "react"; import { View, Text, StyleSheet, TouchableOpacity, FlatList,Button } from "react-native"; //import {TextInput, Button} from 'react-native-paper'; import { Icon, Container, Content } from "native-base"; import CardComponent from "../CardComponent"; import firebase from "react-native-firebase"; import PickerModal from 'react-native-picker-modal-view'; import data from '../TOP.json'
`