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