Last change
on this file since dbd4834 was dbd4834, checked in by Marko <Marko@…>, 22 months ago |
Homepage, login and register components added
|
-
Property mode
set to
100644
|
File size:
839 bytes
|
Line | |
---|
1 | import React, { Component } from 'react'
|
---|
2 | import './SortByComponent.css'
|
---|
3 |
|
---|
4 | export class SortByComponent extends Component {
|
---|
5 |
|
---|
6 | constructor(props) {
|
---|
7 | super(props)
|
---|
8 |
|
---|
9 | this.state = {
|
---|
10 | sortBy: 'mostPopular'
|
---|
11 | }
|
---|
12 | }
|
---|
13 |
|
---|
14 | handleChange = (e) => {
|
---|
15 | this.props.changeHandler({sortBy: e.target.value})
|
---|
16 | }
|
---|
17 |
|
---|
18 | render() {
|
---|
19 | return (
|
---|
20 | <div className="sortby-component-wrapper">
|
---|
21 | <select defaultValue={'mostPopular'} onChange={this.handleChange} className='sortby-component-select'>
|
---|
22 | <option value="mostPopular">Најпопуларно</option>
|
---|
23 | <option value="ascending">Цена: Ниска {'>'} Висока</option>
|
---|
24 | <option value="descending">Цена: Висока {'>'} Ниска</option>
|
---|
25 | </select>
|
---|
26 | </div>
|
---|
27 | )
|
---|
28 | }
|
---|
29 | }
|
---|
30 |
|
---|
31 | export default SortByComponent
|
---|
Note:
See
TracBrowser
for help on using the repository browser.