-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppp.js
35 lines (34 loc) · 828 Bytes
/
Appp.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { Component } from "react";
class Appp extends Component{
constructor()
{
super();
this.state = {
Category: [],
Force:[],
SelectCategory:'',
SelectForce:''
}
this.SelectCategory=this.SelectCategory.bind(this);
this.SelectForce=this.SelectForce.bind(this);
this.Search=this.Search.bind(this);
}
SelectCategory(Category){
this.setState({
SelectCategory:Category.target.value
});
}
SelectForce(Force){
this.setState({
SelectForce:Force.target.value
});
}
Search(){
const {SelectCategory,SelectForce}=this.state;
if(!SelectCategory || !SelectForce)
{
swal('Access','Nice Job','Success')
}
myFunctions.Crimes(SelectCategory,SelectForce).then(res=>console.log(res));
}
}