ywana-core8 0.0.422 → 0.0.423

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/index.umd.js CHANGED
@@ -1098,8 +1098,6 @@
1098
1098
  setLabel = _useState2[1];
1099
1099
 
1100
1100
  React.useEffect(function () {
1101
- console.log('DD change value', label);
1102
-
1103
1101
  if (Array.isArray(options)) {
1104
1102
  var option = options.find(function (option) {
1105
1103
  return option.value === value;
@@ -5351,6 +5349,16 @@
5351
5349
  }
5352
5350
  };
5353
5351
 
5352
+ var reload = function reload() {
5353
+ try {
5354
+ return Promise.resolve(pageContext.load()).then(function () {
5355
+ setPageContext(Object.assign({}, pageContext));
5356
+ });
5357
+ } catch (e) {
5358
+ return Promise.reject(e);
5359
+ }
5360
+ };
5361
+
5354
5362
  var site = React.useContext(SiteContext);
5355
5363
  var _props$id = props.id,
5356
5364
  id = _props$id === void 0 ? "table" : _props$id,
@@ -5398,6 +5406,7 @@
5398
5406
  pageContext = _useContext[0],
5399
5407
  setPageContext = _useContext[1];
5400
5408
 
5409
+ var context = TableContext(url, field, host, urlQuery);
5401
5410
  var selected = pageContext.selected;
5402
5411
  var timer = React.useRef(null);
5403
5412
 
@@ -5405,20 +5414,8 @@
5405
5414
  form = _useState[0],
5406
5415
  setForm = _useState[1];
5407
5416
 
5408
- React.useEffect(function () {
5409
- setForm(selected);
5410
- }, [selected]);
5411
- React.useEffect(function () {
5412
- if (autosave) {
5413
- clearTimeout(timer.current);
5414
- timer.current = setTimeout(function () {
5415
- if (canSave()) save();
5416
- }, delay);
5417
- }
5418
- }, [form]);
5419
5417
  React.useEffect(function () {
5420
5418
  try {
5421
- var context = TableContext(url, field, host, urlQuery);
5422
5419
  return Promise.resolve(context.load()).then(function () {
5423
5420
  function _temp2() {
5424
5421
  setPageContext(context);
@@ -5434,6 +5431,17 @@
5434
5431
  return Promise.reject(e);
5435
5432
  }
5436
5433
  }, []);
5434
+ React.useEffect(function () {
5435
+ setForm(selected);
5436
+ }, [selected]);
5437
+ React.useEffect(function () {
5438
+ if (autosave) {
5439
+ clearTimeout(timer.current);
5440
+ timer.current = setTimeout(function () {
5441
+ if (canSave()) save();
5442
+ }, delay);
5443
+ }
5444
+ }, [form]);
5437
5445
 
5438
5446
  function add() {
5439
5447
  var onOK = function onOK(form) {
@@ -5533,7 +5541,11 @@
5533
5541
  label: "A\xF1adir",
5534
5542
  action: add,
5535
5543
  raised: true
5536
- }) : null, dev ? /*#__PURE__*/React__default["default"].createElement(MenuIcon, {
5544
+ }) : null, "\xA0", /*#__PURE__*/React__default["default"].createElement(Button, {
5545
+ icon: "refresh",
5546
+ label: "Reload",
5547
+ action: reload
5548
+ }), dev ? /*#__PURE__*/React__default["default"].createElement(MenuIcon, {
5537
5549
  align: "alignRight"
5538
5550
  }, /*#__PURE__*/React__default["default"].createElement(MenuItem, {
5539
5551
  label: "Cargar Escenario 1",