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

Updates based on Gitter feedback

This commit is contained in:
G.Ambatte
2021-08-15 19:15:43 +12:00
parent 521c393b74
commit 501b356344
2 changed files with 8 additions and 3 deletions

View File

@@ -102,9 +102,10 @@ const UserPage = createClass({
renderFilterOption : function(){
return <td>
<label>
Filter Title:
<i className='fas fa-search'></i>
<input
type='text'
type='search'
placeholder='search title/description'
onChange={this.handleFilterTextChange}
/>
</label>
@@ -145,7 +146,8 @@ const UserPage = createClass({
getSortedBrews : function(){
const testString = _.deburr(this.state.filterString).toLowerCase();
const brewCollection = this.state.filterString ? _.filter(this.props.brews, (brew)=>{
return (_.deburr(brew?.title).toLowerCase().includes(testString));
return (_.deburr(brew?.title).toLowerCase().includes(testString)) ||
(_.deburr(brew?.description).toLowerCase().includes(testString));
}) : this.props.brews;
return _.groupBy(brewCollection, (brew)=>{
return (brew.published ? 'published' : 'private');

View File

@@ -53,6 +53,9 @@
vertical-align : middle;
tbody tr{
background-color: transparent !important;
i{
padding-right : 5px
}
button{
background-color : transparent;
color : #58180D;