Skip to content

Commit

Permalink
add new section focuses new section
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleogenesis authored and vkWeb committed Oct 19, 2023
1 parent f5e54c3 commit 8ecf464
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<KButton
appearance="flat-button"
icon="plus"
@click="() => quizForge.addSection()"
@click="handleAddSection"
>
{{ ($tr('addSection')).toUpperCase() }}
</KButton>
Expand Down Expand Up @@ -192,6 +192,10 @@
},
},
methods: {
handleAddSection() {
const newSection = this.quizForge.addSection();
this.quizForge.setActiveSection(get(newSection).section_id);
},
handleSectionOptionSelect({ label }, section_id) {
switch (label) {
case 'Edit':
Expand Down

0 comments on commit 8ecf464

Please sign in to comment.