Merge pull request #7889 from aignatov-bio/ai-sci-11106-add-serach-to-row-selection

Add search to repository row selection [SCI-11106]
This commit is contained in:
aignatov-bio 2024-09-26 14:25:55 +02:00 committed by GitHub
commit 40228a9fd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,9 @@ class RepositoriesController < ApplicationController
end
def rows_list
render json: { data: @repository.repository_rows.map { |r| [r.id, r.name] } }
results = @repository.repository_rows
results = results.name_like(params[:query]) if params[:query].present?
render json: { data: results.map { |r| [r.id, r.name] } }
end
def sidebar