-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add user search * Lint js * [COM-632] - updated styling on the user directory search tools to look okay on all screens * [COM-632] added trim to refreshParams so that when groups are selected and then deselected it does not cause text search to fail Co-authored-by: Ian Morland <ian@morland.me> Co-authored-by: Ian Morland <ianm@giffgaff.co.uk> Co-authored-by: Blake Payne <blake@mac-blake.local>
- Loading branch information
1 parent
83fbab1
commit bc4ffe8
Showing
7 changed files
with
131 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import app from 'flarum/app'; | ||
import Component from 'flarum/Component'; | ||
import withAttr from 'flarum/utils/withAttr'; | ||
|
||
export default class SearchField extends Component { | ||
oninit(vnode) { | ||
super.oninit(vnode); | ||
} | ||
|
||
view() { | ||
return ( | ||
<div className="Form-group Usersearchbox"> | ||
<input | ||
className="FormControl" | ||
placeholder={app.translator.trans('fof-user-directory.forum.search.field.placeholder')} | ||
value={this.filter} | ||
oninput={withAttr('value', (value) => { | ||
this.filter = value; | ||
this.performNewSearch(); | ||
})} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
performNewSearch() { | ||
this.attrs.state.refreshParams({ ...this.attrs.state.getParams(), qBuilder: { filter: this.filter } }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters