Make instance select clearable
This commit is contained in:
parent
6ecfbb8892
commit
6b94950e1e
2 changed files with 11 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
:placeholder="$t('statuses.instanceFilter')"
|
||||
:no-data-text="$t('statuses.noInstances')"
|
||||
filterable
|
||||
clearable
|
||||
class="select-instance"
|
||||
@change="handleFilterChange">
|
||||
<el-option
|
||||
|
|
Loading…
Reference in a new issue