aio-table 11.2.2 → 12.0.1

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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -509,7 +509,7 @@ const useTable = (getProps, getPaging, getColumnOption) => {
509
509
  const res = Object.assign({ column: {}, row: {}, rowIndex: 0, isFirst: false, isLast: false, date: [], change: () => { } }, v);
510
510
  const value = getColumnOption('value', res);
511
511
  const jalali = getColumnOption('jalali', res);
512
- const date = res.column.type === 'date' ? new AIODate().convertToArray(getCellValue(res, value), jalali) : [];
512
+ const date = res.column.type === 'date' ? new AIODate().toArray(getCellValue(res, value), jalali) : [];
513
513
  return Object.assign(Object.assign(Object.assign({}, res), { date }), v);
514
514
  }
515
515
  const getCellAttrs = (cellDetail, cellValue, isOdd, striped) => {
@@ -544,12 +544,12 @@ const useTable = (getProps, getPaging, getColumnOption) => {
544
544
  return UT.AddToAttrs(attrs, { className, style, attrs: { title: typeof title === 'string' ? title : undefined } });
545
545
  };
546
546
  const getRowAttrs = (rowDetail, isOdd) => {
547
- const { rowOption = {}, onSwap, value, gap = [0, 1] } = getProps();
547
+ const { rowOption = {}, onSwap, gap = [0, 1] } = getProps();
548
548
  const { attrs: rowAttrs } = rowOption;
549
549
  const attrs = rowAttrs ? rowAttrs(rowDetail) : {};
550
550
  let obj = UT.AddToAttrs(attrs, { className: ['aio-table-row', isOdd ? 'aio-table-row-odd' : 'aio-table-row-even'], style: { gap: gap[0] } });
551
551
  if (onSwap) {
552
- obj = Object.assign(Object.assign(Object.assign({}, obj), DragRows.getDragAttrs({ dragIndex: rowDetail.rowIndex })), DragRows.getDropAttrs({ dropIndex: rowDetail.rowIndex, rows: value }));
552
+ obj = Object.assign(Object.assign(Object.assign({}, obj), DragRows.getDragAttrs(rowDetail.rowIndex)), DragRows.getDropAttrs(rowDetail.rowIndex));
553
553
  }
554
554
  return obj;
555
555
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aio-table",
3
- "version": "11.2.2",
3
+ "version": "12.0.1",
4
4
  "description": "all in one table. tree mode , simple mode , tree mode, gantt mode , groupby mode, freeze mode.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",