WIP: improve search #1
|
@ -111,7 +111,7 @@ export class Search extends Component<any, State> {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
sortLink(sortKey) {
|
sortLink(sortKey: string) {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
<a href={this.buildSortURL(sortKey)}>
|
<a href={this.buildSortURL(sortKey)}>
|
||||||
|
@ -122,7 +122,7 @@ export class Search extends Component<any, State> {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
buildSortURL(sortKey) {
|
buildSortURL(sortKey: string) {
|
||||||
const searchParams = this.state.searchParams;
|
const searchParams = this.state.searchParams;
|
||||||
let page, sortDir;
|
let page, sortDir;
|
||||||
if (sortKey === searchParams.sort_key) {
|
if (sortKey === searchParams.sort_key) {
|
||||||
|
@ -135,7 +135,7 @@ export class Search extends Component<any, State> {
|
||||||
return `/#/search/${searchParams.type_}/${searchParams.q}/${page}/${sortKey}/${sortDir}`;
|
return `/#/search/${searchParams.type_}/${searchParams.q}/${page}/${sortKey}/${sortDir}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
sortLinkIcon(sortKey) {
|
sortLinkIcon(sortKey: string) {
|
||||||
const searchParams = this.state.searchParams;
|
const searchParams = this.state.searchParams;
|
||||||
|
|
||||||
if (searchParams.sort_key !== sortKey) {
|
if (searchParams.sort_key !== sortKey) {
|
||||||
|
|
Loading…
Reference in New Issue