mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 05:34:53 +08:00
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:
commit
40228a9fd1
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue