Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • 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