|
@@ -6,10 +6,15 @@ class Sort extends Component {
|
6
|
6
|
constructor(props){
|
7
|
7
|
super(props)
|
8
|
8
|
this.state = {
|
9
|
|
-
|
|
9
|
+ unwound:false
|
10
|
10
|
}
|
11
|
11
|
}
|
12
|
12
|
|
|
13
|
+ changeArrowDirection = () => {
|
|
14
|
+ console.log('ok');
|
|
15
|
+ this.setState({unwound:!this.state.unwound})
|
|
16
|
+ }
|
|
17
|
+
|
13
|
18
|
render() {
|
14
|
19
|
return (
|
15
|
20
|
<div id="sortBox">
|
|
@@ -18,8 +23,8 @@ class Sort extends Component {
|
18
|
23
|
</div>
|
19
|
24
|
<div id="selectAndOrder">
|
20
|
25
|
<div id="selectBlock">
|
21
|
|
- <div id="selectBox">
|
22
|
|
- <select id="sortSelect" onChange={this.props.handleChangeSortType}>
|
|
26
|
+ <div id={this.state.unwound ? 'unwoundMenu' : 'selectBox'} >
|
|
27
|
+ <select id='sortSelect' onClick={this.changeArrowDirection} onChange={this.props.handleChangeSortType}>
|
23
|
28
|
<option className="optionSort" value="name">Ordre Alphabétique</option>
|
24
|
29
|
<option className="optionSort" value="category_id">Catégorie</option>
|
25
|
30
|
<option className="optionSort" value="quantity">Quantité</option>
|