Arrow up when menu selected
This commit is contained in:
parent
92eb17769f
commit
60294eed6b
6 changed files with 16 additions and 7 deletions
BIN
img/arrow_select_up.png
Normal file
BIN
img/arrow_select_up.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 352 B |
BIN
public/img/arrow_select_up.png
Normal file
BIN
public/img/arrow_select_up.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 352 B |
|
@ -38,6 +38,12 @@
|
||||||
background-position-x: 16vw;
|
background-position-x: 16vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#unwoundMenu{
|
||||||
|
background: url("../../img/arrow_select_up.png") no-repeat;
|
||||||
|
background-size: 2.5vw;
|
||||||
|
background-position-y: center;
|
||||||
|
background-position-x: 16vw;
|
||||||
|
}
|
||||||
|
|
||||||
#sortSelect{
|
#sortSelect{
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
|
BIN
src/img/arrow_select_up.png
Normal file
BIN
src/img/arrow_select_up.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 352 B |
|
@ -16,10 +16,8 @@ class ArticlesByCategory extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(){
|
componentDidUpdate(){
|
||||||
|
console.log(this.state.articles);
|
||||||
|
|
||||||
if (this.props.onSearch){
|
|
||||||
// implémenter une fonction de recherche en React sur articles
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
splitArticlesCategories = () => {
|
splitArticlesCategories = () => {
|
||||||
|
|
|
@ -6,10 +6,15 @@ class Sort extends Component {
|
||||||
constructor(props){
|
constructor(props){
|
||||||
super(props)
|
super(props)
|
||||||
this.state = {
|
this.state = {
|
||||||
|
unwound:false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changeArrowDirection = () => {
|
||||||
|
console.log('ok');
|
||||||
|
this.setState({unwound:!this.state.unwound})
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div id="sortBox">
|
<div id="sortBox">
|
||||||
|
@ -18,8 +23,8 @@ class Sort extends Component {
|
||||||
</div>
|
</div>
|
||||||
<div id="selectAndOrder">
|
<div id="selectAndOrder">
|
||||||
<div id="selectBlock">
|
<div id="selectBlock">
|
||||||
<div id="selectBox">
|
<div id={this.state.unwound ? 'unwoundMenu' : 'selectBox'} >
|
||||||
<select id="sortSelect" onChange={this.props.handleChangeSortType}>
|
<select id='sortSelect' onClick={this.changeArrowDirection} onChange={this.props.handleChangeSortType}>
|
||||||
<option className="optionSort" value="name">Ordre Alphabétique</option>
|
<option className="optionSort" value="name">Ordre Alphabétique</option>
|
||||||
<option className="optionSort" value="category_id">Catégorie</option>
|
<option className="optionSort" value="category_id">Catégorie</option>
|
||||||
<option className="optionSort" value="quantity">Quantité</option>
|
<option className="optionSort" value="quantity">Quantité</option>
|
||||||
|
|
Loading…
Reference in a new issue