From 11e4a7f3e2d467660d5a55a57ad271299834c396 Mon Sep 17 00:00:00 2001 From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com> Date: Tue, 14 Feb 2023 16:29:30 +0100 Subject: [PATCH] Add sorting and search field --- .../name-registration.src.js | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/qortal-ui-plugins/plugins/core/name-registration/name-registration.src.js b/qortal-ui-plugins/plugins/core/name-registration/name-registration.src.js index 1e3e0289..d8906e93 100644 --- a/qortal-ui-plugins/plugins/core/name-registration/name-registration.src.js +++ b/qortal-ui-plugins/plugins/core/name-registration/name-registration.src.js @@ -19,6 +19,8 @@ import '@vaadin/button' import '@vaadin/icon' import '@vaadin/icons' import '@vaadin/grid' +import '@vaadin/grid/vaadin-grid-filter-column.js' +import '@vaadin/grid/vaadin-grid-sort-column.js' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) @@ -30,6 +32,7 @@ class NameRegistration extends LitElement { loading: { type: Boolean }, names: { type: Array }, marketSellNames: { type: Array }, + filteredItems: { type: Array }, recipientPublicKey: { type: String }, selectedAddress: { type: Object }, btnDisable: { type: Boolean }, @@ -189,6 +192,7 @@ class NameRegistration extends LitElement { this.selectedAddress = {} this.names = [] this.marketSellNames = [] + this.filteredItems = [] this.recipientPublicKey = '' this.btnDisable = false this.isLoading = false @@ -241,10 +245,24 @@ class NameRegistration extends LitElement {

${translate("registernamepage.nchange22")}

- + + +
+ - + { if (data.item.owner === this.selectedAddress.address) { render(html`${this.renderCancelSellNameButton(data.item)}`, root) @@ -523,8 +541,9 @@ class NameRegistration extends LitElement { url: `/names/forsale?limit=0&reverse=true` }).then(res => { this.marketSellNames = res + this.filteredItems = this.marketSellNames }) - setTimeout(fetchMarketSellNames, 60000) + setTimeout(fetchMarketSellNames, 120000) } window.addEventListener("contextmenu", (event) => {