hide logs search if there are no logs

pull/2247/head
Ayrat Badykov 5 years ago
parent 9f3ba2ca02
commit 5fd5185136
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 9
      apps/block_scout_web/assets/js/pages/address/logs.js
  2. 4
      apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex

@ -40,6 +40,15 @@ const elements = {
return $el.hide()
}
return $el.show()
}
},
'[data-search]': {
render ($el, state) {
if (state.emptyResponse) {
return $el.hide()
}
return $el.show()
}
}

@ -7,8 +7,8 @@
<div class="card-body" data-async-load data-async-listing="<%= @current_path %>">
<h2 class="card-title"><%= gettext "Logs" %></h2>
<div class="logs-topbar">
<div class="logs-search">
<div data-search class="logs-search">
<input data-search-field class="logs-search-input" type='text' placeholder=<%= gettext("Topic") %> id='search-text-input' />
<button data-cancel-search-button class="logs-search-btn-cancel" type="button">x</button>
<button data-search-button class="logs-search-btn" type="button"><%= gettext("Search") %></button>

Loading…
Cancel
Save