Skip to content

Commit

Permalink
fix: [ANDROAPP-6062] clear search fields when required attributes to …
Browse files Browse the repository at this point in the history
…search
  • Loading branch information
mmmateos committed Apr 18, 2024
1 parent 7b09f1b commit bc31137
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ class SearchTEIViewModel(
val updatedItems = uiState.items.map {
(it as FieldUiModelImpl).copy(value = null, displayName = null)
}
uiState = uiState.copy(items = updatedItems)
uiState = uiState.copy(
items = updatedItems,
searchedItems = mapOf(),
)
searching = false
}

private fun updateSearch() {
Expand Down Expand Up @@ -461,6 +465,8 @@ class SearchTEIViewModel(
)
uiState = uiState.copy(minAttributesMessage = message)
uiState.updateMinAttributeWarning(true)
setSearchScreen()
_refreshData.postValue(Unit)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ fun SearchParametersScreen(
message = message,
duration = SnackbarDuration.Short,
)
uiState.updateMinAttributeWarning(false)
}
}
}
Expand Down

0 comments on commit bc31137

Please sign in to comment.