VueJS collectionView clearChanges관련 문의
페이지 정보
작성자 jw2504 작성일 2022-01-10 16:37 조회 1,474회 댓글 0건본문
관련링크
안녕하세요 clearChanges 메소드 관련하여 문의드립니다.
collectionView 변경내용추적 데모에서 clearChanges 메소드를 테스트해보고 있습니다.
데이터 수정 후 초기화를 클릭하였을때 그리드 내 데이터가 이전 건으로 변경 되지 않는데
clearChanges에서는 처리를 해주지 않는건가요?
따로 처리해야 한다면 어떤 방법이 있는지 문의드립니다.
데모에서 테스트한 app.vue 내용은 아래와 같습니다.
https://demo.grapecity.co.kr/wijmo/learn-wijmo/Core/CollectionView/EditingViews/TrackingChanges/vue
<template> <div class="container-fluid"> <div class="row"> <button id="reset" @click="reset">초기화</button> <div class="col-xs-6"> <wj-flex-grid :itemsSource="view" :allowAddNew="true" :allowDelete="true"> </wj-flex-grid> </div> <div class="col-xs-6"> <h4>Edited Items:</h4> <wj-flex-grid class="changed edited" :itemsSource="view.itemsEdited" :isReadOnly="true"> </wj-flex-grid> <h4>Added Items:</h4> <wj-flex-grid class="changed added" :itemsSource="view.itemsAdded" :isReadOnly="true"> </wj-flex-grid> <h4>Removed Items:</h4> <wj-flex-grid class="changed removed" :itemsSource="view.itemsRemoved" :isReadOnly="true"> </wj-flex-grid> </div> </div> </div> </template> <script> import "bootstrap.css"; import "@grapecity/wijmo.styles/wijmo.css"; import Vue from "vue"; import "@grapecity/wijmo.vue2.grid"; import * as wijmo from "@grapecity/wijmo"; import { getData } from "./data"; let App = Vue.extend({ name: "app", data: function() { return { view: new wijmo.CollectionView(getData(), { sortDescriptions: ["country"], trackChanges: true }) }; }, methods: { reset: function() { alert('view', this.view); this.view.clearChanges(); }, } }); new Vue({ render: h => h(App) }).$mount("#app"); </script>
댓글목록
등록된 댓글이 없습니다.