0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-12 11:02:42 +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(){ renderFilterOption : function(){
return <td> return <td>
<label> <label>
Filter Title: <i className='fas fa-search'></i>
<input <input
type='text' type='search'
placeholder='search title/description'
onChange={this.handleFilterTextChange} onChange={this.handleFilterTextChange}
/> />
</label> </label>
@@ -145,7 +146,8 @@ const UserPage = createClass({
getSortedBrews : function(){ getSortedBrews : function(){
const testString = _.deburr(this.state.filterString).toLowerCase(); const testString = _.deburr(this.state.filterString).toLowerCase();
const brewCollection = this.state.filterString ? _.filter(this.props.brews, (brew)=>{ 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; }) : this.props.brews;
return _.groupBy(brewCollection, (brew)=>{ return _.groupBy(brewCollection, (brew)=>{
return (brew.published ? 'published' : 'private'); return (brew.published ? 'published' : 'private');

View File

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