@ditojs/admin 2.2.6 → 2.2.7-debug.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/admin",
3
- "version": "2.2.6",
3
+ "version": "2.2.7-debug.0",
4
4
  "type": "module",
5
5
  "description": "Dito.js Admin is a schema based admin interface for Dito.js Server, featuring auto-generated views and forms and built with Vue.js",
6
6
  "repository": "https://github.com/ditojs/dito/tree/master/packages/admin",
@@ -82,7 +82,7 @@
82
82
  "vite": "^4.3.1"
83
83
  },
84
84
  "types": "types",
85
- "gitHead": "f0449472c803ce29c76442f6b11f646c5bb5dd80",
85
+ "gitHead": "3e466e0a94142eda903705f977712e4080b50ebb",
86
86
  "scripts": {
87
87
  "build": "vite build",
88
88
  "watch": "yarn build --mode 'development' --watch",
@@ -293,6 +293,7 @@ export default {
293
293
  },
294
294
 
295
295
  onInput() {
296
+ console.log('onInput()', this.name)
296
297
  this.markDirty()
297
298
  this.emitEvent('input')
298
299
  },
@@ -305,10 +306,14 @@ export default {
305
306
  // For some odd reason, the native change event now sometimes fires
306
307
  // twice on Vue3. Filter out second call.
307
308
  // TODO: Investigate why this happens, and if it's a bug in Vue3.
308
- if (value === this.changedValue) return
309
+ if (value === this.changedValue) {
310
+ console.log('onChange() double', this.name)
311
+ return
312
+ }
309
313
  this.changedValue = value
310
314
  }
311
315
 
316
+ console.log('onChange()', this.name, value)
312
317
  this.markDirty()
313
318
  this.emitEvent('change', {
314
319
  // Prevent endless parse recursion:
@@ -195,10 +195,17 @@ export default DitoTypeComponent.register('list', {
195
195
  },
196
196
  set query(query) {
197
197
  const component = getListComponent()
198
+ console.log('set query', query, !!component)
198
199
  if (component) {
199
200
  // Filter out undefined values for comparing with equals()
200
201
  const filter = obj => pickBy(obj, value => value !== undefined)
202
+ console.log(
203
+ 'set query',
204
+ JSON.stringify(filter(query)),
205
+ JSON.stringify(filter(component.query))
206
+ )
201
207
  if (!equals(filter(query), filter(component.query))) {
208
+ console.log('load data')
202
209
  component.query = query
203
210
  component.loadData(false)
204
211
  }
@@ -109,6 +109,15 @@ export function createFiltersPanel(api, filters, dataPath, proxy) {
109
109
 
110
110
  methods: {
111
111
  applyFilters() {
112
+ console.log(
113
+ 'applyFilters()',
114
+ JSON.stringify({
115
+ ...proxy.query,
116
+ filter: this.filters,
117
+ // Clear pagination when applying or clearing filters:
118
+ page: undefined
119
+ })
120
+ )
112
121
  proxy.query = {
113
122
  ...proxy.query,
114
123
  filter: this.filters,
@@ -118,6 +127,7 @@ export function createFiltersPanel(api, filters, dataPath, proxy) {
118
127
  },
119
128
 
120
129
  clearFilters() {
130
+ console.log('clearFilters()')
121
131
  this.resetData()
122
132
  this.applyFilters()
123
133
  }