diff --git a/app/controllers/repository_columns/list_columns_controller.rb b/app/controllers/repository_columns/list_columns_controller.rb index 79d87de78..c836f9bc4 100644 --- a/app/controllers/repository_columns/list_columns_controller.rb +++ b/app/controllers/repository_columns/list_columns_controller.rb @@ -32,11 +32,14 @@ module RepositoryColumns end def items - column_list_items = @repository_column.repository_list_items - .where('data ILIKE ?', - "%#{search_params[:query]}%") - .limit(Constants::SEARCH_LIMIT) - .select(:id, :data) + column_list_items = if params[:all_options] + @repository_column.repository_list_items.select(:id, :data) + else + @repository_column.repository_list_items + .where('data ILIKE ?', "%#{search_params[:query]}%") + .limit(Constants::SEARCH_LIMIT) + .select(:id, :data) + end render json: column_list_items.map { |i| { value: i.id, label: escape_input(i.data) } }, status: :ok end diff --git a/app/javascript/vue/repository_item_sidebar/repository_values/RepositoryListValue.vue b/app/javascript/vue/repository_item_sidebar/repository_values/RepositoryListValue.vue index 55a172ccc..fd7b76cb5 100644 --- a/app/javascript/vue/repository_item_sidebar/repository_values/RepositoryListValue.vue +++ b/app/javascript/vue/repository_item_sidebar/repository_values/RepositoryListValue.vue @@ -66,7 +66,7 @@ export default { mounted() { this.isLoading = true; - $.get(this.optionsPath, (data) => { + $.get(this.optionsPath, { all_options: true }, (data) => { if (Array.isArray(data)) { this.options = data.map((option) => { const { value, label } = option; @@ -75,6 +75,7 @@ export default { return false; } this.options = []; + return true; }).always(() => { this.isLoading = false; this.selected = this.id;