andrea.nieves7 1 year ago
parent
commit
832809f223
1 changed files with 5 additions and 52 deletions
  1. 5
    52
      App.js

+ 5
- 52
App.js View File

@@ -60,11 +60,10 @@ DropDownPicker.setListMode("SCROLLVIEW")
60 60
 
61 61
 //data query variables (global)
62 62
 
63
-const queryBase = "https://api.census.gov/data/2020/acs/acs5/profile?get=group"
63
+const queryBase = "http://127.0.0.1:5378/table?table=DP03&municipality=Ceiba"
64 64
 const queryEnd = "&in=state:72"
65 65
 var table = ""
66 66
 var pueblo = ""
67
-var year = ""
68 67
 
69 68
 
70 69
 function updateTable(value){
@@ -75,10 +74,6 @@ function updatePueblo(value){
75 74
 	pueblo = value
76 75
 }
77 76
 
78
-function updateYear(value) {
79
-	year = value
80
-}
81
-
82 77
 //calls data query
83 78
 function loadDoc(query) {
84 79
   var xhttp = new XMLHttpRequest();
@@ -347,32 +342,6 @@ function Picker() {
347 342
   ]);
348 343
   
349 344
   
350
-  const [openYear, setOpenYear] = useState(false);
351
-  const [valueYear, setValueYear] = useState(null);
352
-  const [year, setYear] = useState([
353
-    {label:'2000', value: '2000'},
354
-    {label:'2001', value: '2001'},
355
-	{label:'2002', value: '2002'},
356
-    {label:'2003', value: '2003'},
357
-	{label:'2004', value: '2004'},
358
-    {label:'2005', value: '2005'},
359
-	{label:'2006', value: '2006'},
360
-    {label:'2007', value: '2007'},
361
-	{label:'2008', value: '2008'},
362
-    {label:'2009', value: '2009'},
363
-	{label:'2010', value: '2010'},
364
-    {label:'2011', value: '2011'},
365
-	{label:'2012', value: '2012'},
366
-    {label:'2013', value: '2013'},
367
-	{label:'2014', value: '2014'},
368
-    {label:'2015', value: '2015'},
369
-	{label:'2016', value: '2016'},
370
-    {label:'2017', value: '2017'},
371
-	{label:'2018', value: '2018'},
372
-    {label:'2019', value: '2019'},
373
-	{label:'2020', value: '2020'}
374
-  ]);
375
-  
376 345
 
377 346
   return (
378 347
   <View>
@@ -386,7 +355,7 @@ function Picker() {
386 355
 	  onChangeValue = {(valueTable) => {
387 356
 		updateTable(valueTable);
388 357
 		}}
389
-	  onOpen = {() => {setOpenPueblo(false);setOpenYear(false)}}
358
+	  onOpen = {() => {setOpenPueblo(false)}}
390 359
 	  zIndex={3000}
391 360
 	  zIndexInverse={1000}
392 361
 	  placeholder="Tabla de Datos"
@@ -403,29 +372,13 @@ function Picker() {
403 372
 	  onChangeValue = {(valuePueblo) => {
404 373
 		updatePueblo(valuePueblo);
405 374
 		}}
406
-	  onOpen = {() => {setOpenTable(false);setOpenYear(false)}}
407
-	  zIndex={2000}
408
-      zIndexInverse={2000}
375
+	  onOpen = {() => {setOpenTable(false)}}
376
+	  zIndex={1000}
377
+      zIndexInverse={3000}
409 378
 	  placeholder="Pueblo"
410 379
 	  searchPlaceholder="Busqueda..."
411 380
     />
412 381
 	
413
-	 <DropDownPicker
414
-      open={openYear}
415
-      value={valueYear}
416
-      items={year}
417
-      setOpen={setOpenYear}
418
-      setValue={setValueYear}
419
-      setItems={setYear}
420
-	  onChangeValue = {(valueYear) => {
421
-		updateYear(valueYear);
422
-		}}
423
-	  onOpen = {() => {setOpenPueblo(false);setOpenTable(false)}}
424
-	  zIndex={1000}
425
-	  zIndexInverse={3000}
426
-	  placeholder="20xx"
427
-    />
428
-	
429 382
 	</View>
430 383
   );
431 384
 }