WIP: improve search #1

Closed
rob wants to merge 26 commits from improve-search into master
2 changed files with 5 additions and 18 deletions
Showing only changes of commit 300a535481 - Show all commits

View File

@ -75,7 +75,6 @@ export class Navbar extends Component<any, State> {
}
searchChange(i: Navbar, event) {
console.log("in searchChange");
let searchParams: SearchParams = {
q: event.target.value,
page: 1,

View File

@ -31,7 +31,6 @@ export class Search extends Component<any, State> {
}
componentDidMount() {
console.log("comp did mount");
this.state.searchParams = {
page: Number(this.props.match.params.page),
q: this.props.match.params.q,
@ -44,7 +43,6 @@ export class Search extends Component<any, State> {
// Re-do search if the props have changed
componentDidUpdate(lastProps: any) {
console.log("comp did update");
if (lastProps.match && lastProps.match.params !== this.props.match.params) {
this.state.searchParams = {
page: Number(this.props.match.params.page),
@ -161,21 +159,11 @@ export class Search extends Component<any, State> {
<table class="table table-fixed table-hover table-sm table-striped table-hover-purple table-padding">
<thead>
<tr>
<th class="search-name-col">
{this.sortLink("Name")}
</th>
<th class="text-right">
{this.sortLink("Size")}
</th>
<th class="text-right">
{this.sortLink("Seeders")}
</th>
<th class="text-right d-none d-md-table-cell">
{this.sortLink("Leechers")}
</th>
<th class="text-right d-none d-md-table-cell">
{this.sortLink("Scraped")}
</th>
<th class="search-name-col">{this.sortLink("Name")}</th>
<th class="text-right">{this.sortLink("Size")}</th>
<th class="text-right">{this.sortLink("Seeders")}</th>
<th class="text-right d-none d-md-table-cell">{this.sortLink("Leechers")}</th>
<th class="text-right d-none d-md-table-cell">{this.sortLink("Scraped")}</th>
<th></th>
</tr>
</thead>