mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-08 22:24:23 +08:00
Add step number to dropodown [SCI-12037]
This commit is contained in:
parent
3290348860
commit
99c2b626a7
2 changed files with 5 additions and 1 deletions
|
@ -285,7 +285,7 @@ class StepsController < ApplicationController
|
|||
render json: {
|
||||
paginated: true,
|
||||
next_page: steps.next_page,
|
||||
data: steps.map { |step| [step.id, step.name] }
|
||||
data: steps.map { |step| [step.id, step.name, { position: step.position }] }
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
:value="selectedSteps"
|
||||
:searchable="true"
|
||||
@change="changeSteps"
|
||||
:option-renderer="stepRenderer"
|
||||
:multiple="true"
|
||||
:withCheckboxes="true"
|
||||
:placeholder="i18n.t('my_modules.results.modals.link_steps.placeholder')" />
|
||||
|
@ -137,6 +138,9 @@ export default {
|
|||
.then((response) => {
|
||||
this.steps = response.data;
|
||||
});
|
||||
},
|
||||
stepRenderer(option) {
|
||||
return `${option[2].position + 1}. ${option[1]}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue