0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 18:12:40 +00:00

change sortDir by clicking on sort title.

This commit is contained in:
Gazook89
2022-09-21 11:12:23 -05:00
parent 6329cb2cec
commit 3754468cf4
2 changed files with 3 additions and 2 deletions

View File

@@ -117,7 +117,7 @@ const ListPage = createClass({
return <div className={`sort-option ${(this.state.sortType == sortValue ? 'active' : '')}`}>
<button
value={`${sortValue}`}
onClick={this.handleSortOptionChange}
onClick={this.state.sortType == sortValue ? this.handleSortDirChange : this.handleSortOptionChange}
>
{`${sortTitle}`}
</button>

View File

@@ -69,10 +69,11 @@
font-weight: bold;
color: #ddd;
background-color: #333;
button {
color: white;
font-weight: 800;
height: 100%;
&.sortDir {
padding-left: 5px;
}