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