Search Result Name Not Found
This commit is contained in:
parent
c175322d36
commit
eeca17b1f0
@ -303,14 +303,18 @@ class Websites extends LitElement {
|
|||||||
async searchResult() {
|
async searchResult() {
|
||||||
let searchName = this.shadowRoot.getElementById('searchName').value
|
let searchName = this.shadowRoot.getElementById('searchName').value
|
||||||
if (searchName.length === 0) {
|
if (searchName.length === 0) {
|
||||||
parentEpml.request('showSnackBar', 'Name cannot be empty!')
|
parentEpml.request('showSnackBar', 'Name Can Not Be Empty!')
|
||||||
} else {
|
} else {
|
||||||
let searchResources = await parentEpml.request('apiCall', {
|
let searchResources = await parentEpml.request('apiCall', {
|
||||||
url: `/arbitrary/resources/search?service=${this.service}&query=${searchName}&default=true&limit=5&reverse=false&includestatus=true`
|
url: `/arbitrary/resources/search?service=${this.service}&query=${searchName}&default=true&limit=5&reverse=false&includestatus=true`
|
||||||
})
|
})
|
||||||
|
if (this.isEmptyArray(searchResources)) {
|
||||||
|
parentEpml.request('showSnackBar', 'Name Not Found!')
|
||||||
|
} else {
|
||||||
this.searchResources = searchResources
|
this.searchResources = searchResources
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
renderSearchAvatar(searchObj) {
|
renderSearchAvatar(searchObj) {
|
||||||
let name = searchObj.name
|
let name = searchObj.name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user