ywana-core8 0.0.286 → 0.0.289

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
@@ -262,6 +262,8 @@
262
262
  onChange = props.onChange;
263
263
 
264
264
  function change(event) {
265
+ event.stopPropagation();
266
+ event.preventDefault();
265
267
  var value = event.target.checked;
266
268
  if (onChange) onChange(id, value);
267
269
  }
@@ -1442,7 +1444,9 @@
1442
1444
  }
1443
1445
 
1444
1446
  function select(row, event) {
1445
- if (onRowSelection) onRowSelection(row, event);
1447
+ if (event.target.id !== "checked") {
1448
+ if (onRowSelection) onRowSelection(row, event);
1449
+ }
1446
1450
  }
1447
1451
 
1448
1452
  function sort(dragged, dropped) {
@@ -1473,6 +1477,7 @@
1473
1477
  colspan = _ref2[1];
1474
1478
 
1475
1479
  return /*#__PURE__*/React__default["default"].createElement("th", {
1480
+ key: id,
1476
1481
  rowSpan: rowspan,
1477
1482
  colSpan: colspan
1478
1483
  }, id === "checked" ? /*#__PURE__*/React__default["default"].createElement(CheckBox, {
@@ -2417,7 +2422,8 @@
2417
2422
  lanes = _ref$lanes === void 0 ? [] : _ref$lanes,
2418
2423
  _ref$navigation = _ref.navigation,
2419
2424
  navigation = _ref$navigation === void 0 ? true : _ref$navigation,
2420
- onSelectCell = _ref.onSelectCell;
2425
+ onSelectCell = _ref.onSelectCell,
2426
+ focusEvent = _ref.focusEvent;
2421
2427
 
2422
2428
  var _useState = React.useState("month"),
2423
2429
  dateRange = _useState[0],
@@ -2431,6 +2437,14 @@
2431
2437
  to = _useState3[0],
2432
2438
  setTo = _useState3[1];
2433
2439
 
2440
+ React.useEffect(function () {
2441
+ var element = document.getElementById(focusEvent);
2442
+ if (element) element.scrollIntoView({
2443
+ behavior: 'smooth',
2444
+ block: 'start',
2445
+ inline: 'center'
2446
+ });
2447
+ }, [focusEvent]);
2434
2448
  React.useEffect(function () {
2435
2449
  var today = moment__default["default"]();
2436
2450
  var from_date = today.startOf(dateRange).format("YYYY-MM-DD");