Make instance select clearable

This commit is contained in:
Angelina Filippova 2020-02-03 17:43:20 +03:00
parent 6ecfbb8892
commit 6b94950e1e
2 changed files with 11 additions and 8 deletions

View file

@ -54,14 +54,16 @@ const status = {
},
async FetchStatusesByInstance({ commit, getters, state }) {
commit('SET_LOADING', true)
const statuses = await fetchStatusesByInstance(
{
instance: state.statusesByInstance.selectedInstance,
authHost: getters.authHost,
token: getters.token,
pageSize: state.statusesByInstance.pageSize,
page: state.statusesByInstance.page
})
const statuses = state.statusesByInstance.selectedInstance === ''
? { data: [] }
: await fetchStatusesByInstance(
{
instance: state.statusesByInstance.selectedInstance,
authHost: getters.authHost,
token: getters.token,
pageSize: state.statusesByInstance.pageSize,
page: state.statusesByInstance.page
})
commit('SET_STATUSES', statuses.data)
commit('SET_LOADING', false)

View file

@ -9,6 +9,7 @@
:placeholder="$t('statuses.instanceFilter')"
:no-data-text="$t('statuses.noInstances')"
filterable
clearable
class="select-instance"
@change="handleFilterChange">
<el-option