@dimailn/vuetify 2.7.2-alpha5 → 2.7.2-alpha6

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/dist/vuetify.js CHANGED
@@ -9698,8 +9698,17 @@ var __spreadArray = undefined && undefined.__spreadArray || function (to, from,
9698
9698
  if (Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["deepEqual"])(options, old)) return;
9699
9699
  this.$emit('update:options', options);
9700
9700
  },
9701
- deep: true,
9702
- immediate: true
9701
+ deep: true
9702
+ /*
9703
+ In Vue 3 this watcher fires even before created hook and
9704
+ if mounting fails and the consumer code relies on update:options event to fetch data
9705
+ it causes infinite loop because each data update triggers an attempt to render a table,
9706
+ but because mounting constantly fails(for example, due to error in slot) it never happens.
9707
+ Previously, in Vue 2 slot errors didn't cause mounting failure, we had partially rendered component.
9708
+ This immediate prop is compensated by firing event in mounted hook.
9709
+ */
9710
+ // immediate: true,
9711
+
9703
9712
  },
9704
9713
  page: function page(_page) {
9705
9714
  this.updateOptions({
@@ -9898,6 +9907,9 @@ var __spreadArray = undefined && undefined.__spreadArray || function (to, from,
9898
9907
  },
9899
9908
  render: function render() {
9900
9909
  return this.$slots.default && this.$slots.default(this.scopedProps)[0];
9910
+ },
9911
+ mounted: function mounted() {
9912
+ this.$emit('update:options', this.internalOptions);
9901
9913
  }
9902
9914
  }));
9903
9915
 
@@ -10788,23 +10800,23 @@ function needsTd(slot) {
10788
10800
  rtl: Boolean
10789
10801
  },
10790
10802
  render: function render() {
10791
- var _this = this;
10803
+ var _this = this; // const props = this.$props
10804
+
10792
10805
 
10793
- var props = this.$props;
10794
10806
  var data = this.$attrs;
10795
- var columns = props.headers.map(function (header) {
10807
+ var columns = this.headers.map(function (header) {
10796
10808
  var children = [];
10797
- var value = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_1__["getObjectValueByPath"])(props.item, header.value);
10809
+ var value = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_1__["getObjectValueByPath"])(_this.item, header.value);
10798
10810
  var slotName = header.value;
10799
10811
 
10800
10812
  var scopedSlot = _this.$slots.hasOwnProperty(slotName) && _this.$slots[slotName];
10801
10813
 
10802
10814
  if (scopedSlot) {
10803
10815
  children.push.apply(children, __spreadArray([], __read(Object(_util_helpers__WEBPACK_IMPORTED_MODULE_1__["wrapInArray"])(scopedSlot({
10804
- item: props.item,
10816
+ item: _this.item,
10805
10817
  isMobile: false,
10806
10818
  header: header,
10807
- index: props.index,
10819
+ index: _this.index,
10808
10820
  value: value
10809
10821
  }))), false));
10810
10822
  } else {
@@ -20171,8 +20183,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_12__["default"])(_
20171
20183
  'v-menu--attached': this.attach === '' || this.attach === true || this.attach === 'attach'
20172
20184
  }]
20173
20185
  };
20174
- var directives = [[_directives_resize__WEBPACK_IMPORTED_MODULE_11__["default"], this.onResize, '500']]; // console.log('vmenurender', this, this.activator, this.getActivator())
20175
-
20186
+ var directives = [[_directives_resize__WEBPACK_IMPORTED_MODULE_11__["default"], this.onResize, '500']];
20176
20187
  return Object(vue__WEBPACK_IMPORTED_MODULE_0__["withDirectives"])(Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', data, [!this.activator && this.genActivator(), this.showLazyContent(function () {
20177
20188
  return [Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VThemeProvider__WEBPACK_IMPORTED_MODULE_2__["VThemeProvider"], {
20178
20189
  root: true,
@@ -39277,7 +39288,10 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_2__["default"])(_d
39277
39288
  var node = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_3__["getSlot"])(this, 'activator', Object.assign(this.getValueProxy(), {
39278
39289
  attrs: __assign(__assign({}, this.genActivatorListeners()), this.genActivatorAttributes())
39279
39290
  })) || [];
39280
- this.activatorNode = node;
39291
+ node = Array.isArray(node) ? node : [node];
39292
+ this.activatorNode = node.flatMap(function (node) {
39293
+ return node.type === Symbol.for('v-fgt') ? node.children : node;
39294
+ });
39281
39295
  return node;
39282
39296
  },
39283
39297
  genActivatorAttributes: function genActivatorAttributes() {
@@ -39327,7 +39341,9 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_2__["default"])(_d
39327
39341
  return listeners;
39328
39342
  },
39329
39343
  getActivator: function getActivator(e) {
39330
- // If we've already fetched the activator, re-use
39344
+ var _a; // If we've already fetched the activator, re-use
39345
+
39346
+
39331
39347
  if (this.activatorElement) return this.activatorElement;
39332
39348
  var activator = null;
39333
39349
 
@@ -39348,7 +39364,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_2__["default"])(_d
39348
39364
  // Use the contents of the activator slot
39349
39365
  // There's either only one element in it or we
39350
39366
  // don't have a click event to use as a last resort
39351
- var vm = this.activatorNode[0].component.ctx;
39367
+ var vm = (_a = this.activatorNode[0].component) === null || _a === void 0 ? void 0 : _a.ctx;
39352
39368
 
39353
39369
  if (vm && (vm.isActivatable !== undefined || vm.isMenuable !== undefined)) {
39354
39370
  // Activator is actually another activatible component, use its activator (#8846)