Topic: Get order of mdb-sortable items list
GuillaumeDgr premium asked 4 years ago
Expected behavior Get items list order/positions after reordering them in mdb-sortable list.
Actual behavior No doc, nothing in forum.
Resources (screenshots, code snippets etc.)
<mdb-list-group>
<mdb-sortable :list="questionAnswer.propositions" v-model="value.classementPropositions">
<mdb-list-group-item
v-for="(proposition, index) in questionAnswer.propositions"
:key="proposition.id"
:active="index == 0">
<span>{{ index + 1 }}</span>
{{ proposition }}
</mdb-list-group-item>
</mdb-sortable>
</mdb-list-group>
Mikołaj Smoleński staff answered 4 years ago
In sortable plugin we applied two-way data binding. Thanks to that the list itself reacts to all order changes. You can check adding the following code anywhere:
{{ questionAnswer.propositions }}
Best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Premium
- Premium support: Yes
- Technology: MDB Vue
- MDB Version: 6.7.1
- Device: Mac book pro
- Browser: Firefox developers
- OS: MacOs
- Provided sample code: No
- Provided link: No