Skip to content

Commit a14e6ab

Browse files
remove tap to rank hint and implement draggable ranking
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
1 parent 145f0e8 commit a14e6ab

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/components/Questions/QuestionRanking.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,21 @@
3434
:aria-describedby="description ? descriptionId : undefined">
3535
<!-- Unranked pool -->
3636
<div class="ranking-unranked">
37-
<p class="ranking-section__label">
38-
{{ t('forms', 'Tap to rank') }}
39-
</p>
40-
<div
37+
<Draggable
4138
v-show="unrankedOptions.length > 0"
42-
class="ranking-unranked__pool">
39+
v-model="unrankedOptions"
40+
class="ranking-unranked__pool"
41+
:animation="200"
42+
:group="{ name: 'ranking', pull: true, put: true }"
43+
@end="emitValues">
4344
<button
4445
v-for="option in unrankedOptions"
4546
:key="option.id"
4647
class="ranking-unranked__item"
4748
@click="rankOption(option)">
4849
{{ option.text }}
4950
</button>
50-
</div>
51+
</Draggable>
5152
<p
5253
v-show="unrankedOptions.length === 0"
5354
class="ranking-unranked__empty">
@@ -64,6 +65,7 @@
6465
v-model="rankedOptions"
6566
class="ranking-ranked__list"
6667
:animation="200"
68+
:group="{ name: 'ranking', pull: true, put: true }"
6769
direction="vertical"
6870
handle=".ranking-item__drag-handle"
6971
@end="onRankingEnd">

0 commit comments

Comments
 (0)