Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

412
Views
Vue.js - How to add an event after I dragged and changed the order of El_Table?

I am using element-ui-el-table-draggable to obtain the draggable effect.

My table is rendered by the following code, and can be dragged to change the order of the rows.

        <p class="p-3" v-if="departmentlist">
          <ElTableDraggable>
            <el-table
              stripe
              class="table-responsive table"
              header-row-class-name="thead-light"
              :data="departmentlist"
              @row-click="row_clicked_event">
              <!-- <el-table-column label="ID" prop="IDn">
                <template v-slot="{ row }">
                  {{ row.IDn }}
                </template>
              </el-table-column> -->
              <el-table-column label="PLU" prop="PLU" :key="PLU"> </el-table-column>
              <el-table-column :label="$t('Name') + '1'" prop="Name1" :key="$t('Name') + '1'">
              </el-table-column>
              <el-table-column :label="$t('Name') + '2'" prop="Name2" :key="$t('Name') + '2'">
              </el-table-column>
              <el-table-column :label="$t('Sort Order')" prop="SortOrder" :key="$t('Sort Order')">
              </el-table-column>
              <el-table-column :label="$t('Remarks')" prop="Remarks" :key="$t('Remarks')">
              </el-table-column>
            </el-table>
          </ElTableDraggable>
        </p>
        <p class="p-3" v-else>
          {{ $t("No Records") }}
        </p>

However, every time the page is refreshed, the order will revert to its original state. This is because the 'Sort Order' has never been changed after I dragged and moved a row.

What can be done so that every time when a row is moved, I can call a method?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!