aio-table 11.1.2 → 11.1.3

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 +9 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -431,7 +431,14 @@ const TableCell = (props) => {
431
431
  const beforeValue = tableHook.getCellValue(cellDetail, before, undefined);
432
432
  const afterValue = tableHook.getCellValue(cellDetail, after, undefined);
433
433
  const subtextValue = tableHook.getCellValue(cellDetail, subtext, undefined);
434
- return (_jsx(Fragment, { children: _jsxs("div", Object.assign({}, tableHook.getCellAttrs(props.cellDetail, props.cellValue, isOdd, rootProps.striped), { children: [beforeValue !== undefined && _jsx("div", { className: "aio-table-cell-before", children: beforeValue }), _jsxs("div", { className: `aio-table-cell-value${subtext !== undefined ? ' has-subtext' : ''}`, "data-subtext": subtextValue, children: [templateValue !== undefined && templateValue, templateValue === undefined && cellValue] }), afterValue !== undefined && _jsx("div", { className: "aio-table-cell-after", children: afterValue })] })) }, rowId + ' ' + colId));
434
+ let content;
435
+ if (templateValue !== undefined) {
436
+ content = templateValue;
437
+ }
438
+ else {
439
+ content = cellValue;
440
+ }
441
+ return (_jsx(Fragment, { children: _jsxs("div", Object.assign({}, tableHook.getCellAttrs(props.cellDetail, cellValue, isOdd, rootProps.striped), { children: [beforeValue !== undefined && _jsx("div", { className: "aio-table-cell-before", children: beforeValue }), _jsx("div", { className: `aio-table-cell-value${subtext !== undefined ? ' has-subtext' : ''}`, "data-subtext": subtextValue, children: content }), afterValue !== undefined && _jsx("div", { className: "aio-table-cell-after", children: afterValue })] })) }, rowId + ' ' + colId));
435
442
  };
436
443
  const useTable = (getProps, getPaging, getColumnOption) => {
437
444
  const DragRows = UT.useDrag((dragIndex, dropIndex, reOrder) => {
@@ -502,7 +509,7 @@ const useTable = (getProps, getPaging, getColumnOption) => {
502
509
  const width = getColumnOption('width', cellDetail);
503
510
  const minWidth = getColumnOption('minWidth', cellDetail);
504
511
  const className = `aio-table-cell` + (justify ? ` aio-table-cell-justify` : '');
505
- const style = { width, minWidth, flex: width ? undefined : 1 };
512
+ const style = { width, minWidth, flex: width ? undefined : 1, direction: typeof cellValue === 'number' ? 'ltr' : undefined };
506
513
  if (striped) {
507
514
  style.background = isOdd ? striped[0] : striped[1];
508
515
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aio-table",
3
- "version": "11.1.2",
3
+ "version": "11.1.3",
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",