ywana-core8 0.0.824 → 0.0.825

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
@@ -3427,11 +3427,15 @@
3427
3427
  setTo = _useState3[1];
3428
3428
 
3429
3429
  var thisMondayElement = React.useRef(null);
3430
- React.useEffect(function () {
3431
- if (thisMondayElement.current) {
3432
- showThisWeek();
3433
- }
3434
- }, [thisMondayElement]);
3430
+ var gotoMonday = React.useCallback(function (node) {
3431
+ var element = node;
3432
+ console.log("goto monday", element);
3433
+ if (element) element.scrollIntoView({
3434
+ behavior: 'smooth',
3435
+ block: 'start',
3436
+ inline: 'start'
3437
+ });
3438
+ }, []);
3435
3439
  React.useEffect(function () {
3436
3440
  var element = document.getElementById(focusEvent);
3437
3441
  if (element) element.scrollIntoView({
@@ -3473,6 +3477,7 @@
3473
3477
  function showThisWeek() {
3474
3478
  var element = thisMondayElement.current; //const element = document.querySelector(".thisMonday")
3475
3479
 
3480
+ console.log("Show this week", element);
3476
3481
  if (element) element.scrollIntoView({
3477
3482
  behavior: 'smooth',
3478
3483
  block: 'start',
@@ -3575,10 +3580,12 @@
3575
3580
  var isThisMonday = date.moment.isSame(weekStart);
3576
3581
  return /*#__PURE__*/React__default["default"].createElement("div", {
3577
3582
  key: "column-" + date.moment.dayOfYear(),
3583
+ id: isThisMonday ? "thisMonday" : "",
3578
3584
  className: "column-header",
3579
3585
  ref: isThisMonday ? thisMondayElement : null
3580
3586
  }, /*#__PURE__*/React__default["default"].createElement("div", {
3581
- className: "date-header " + weekend + " " + thisWeek
3587
+ className: "date-header " + weekend + " " + thisWeek,
3588
+ ref: isThisMonday ? gotoMonday : null
3582
3589
  }, /*#__PURE__*/React__default["default"].createElement(Text, {
3583
3590
  use: "headline6"
3584
3591
  }, date.moment.format("DD")), "\xA0", /*#__PURE__*/React__default["default"].createElement(Text, {