mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 12:43:06 +08:00
Add search to repository row selection [SCI-11106]
This commit is contained in:
parent
96835a171e
commit
9e70d5b935
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