embed: support referencing specific pages by index into page list, eg. url="page:0" will load the first page

sorter: use defaultKey / defaultDesc for url-resources sorter
This commit is contained in:
Ilya Kreymer
2020-09-06 20:42:32 -07:00
parent a3214dc081
commit 3f5431b7d7
5 changed files with 92 additions and 83 deletions
+4 -4
View File
@@ -62,8 +62,8 @@ class URLResources extends LitElement
this.tryMore = false;
this.loading = false;
this.sortKey = "url";
this.sortDesc = false;
this.sortKey = null;
this.sortDesc = null;
}
static get properties() {
@@ -307,8 +307,8 @@ class URLResources extends LitElement
<div class="sort-header is-hidden-tablet">
<wr-sorter id="urls"
defaultKey="url"
.sortKey="${this.sortKey}"
.sortDesc="${this.sortDesc}"
defaultKey="${this.sortKey ? this.sortKey : "url"}"
?defaultDesc="${this.sortDesc !== null ? this.sortDesc : false}"
.sortKeys="${URLResources.sortKeys}"
.data="${this.filteredResults}"
@sort-changed="${this.onSortChanged}">