ywana-core8 0.0.522 → 0.0.525
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.cjs +14 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +14 -7
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +14 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +7 -6
- package/src/html/table.test.js +2 -1
- package/src/html/textfield.js +1 -1
package/dist/index.modern.js
CHANGED
@@ -1393,7 +1393,7 @@ var DropDown = function DropDown(props) {
|
|
1393
1393
|
return /*#__PURE__*/React.createElement("li", {
|
1394
1394
|
key: option.value,
|
1395
1395
|
value: option.value
|
1396
|
-
}, option.label);
|
1396
|
+
}, /*#__PURE__*/React.createElement(Text, null, option.label));
|
1397
1397
|
});
|
1398
1398
|
return /*#__PURE__*/React.createElement("menu", null, /*#__PURE__*/React.createElement("ul", {
|
1399
1399
|
onMouseDown: select
|
@@ -1599,9 +1599,10 @@ var DataTable = function DataTable(props) {
|
|
1599
1599
|
}).map(function (field) {
|
1600
1600
|
return /*#__PURE__*/React.createElement("th", null, field.label);
|
1601
1601
|
});
|
1602
|
-
}))), /*#__PURE__*/React.createElement("tbody", null, rows.length > 0 ? multiSort(rows, sortDir).map(function (row) {
|
1602
|
+
}))), /*#__PURE__*/React.createElement("tbody", null, rows.length > 0 ? multiSort(rows, sortDir).map(function (row, index) {
|
1603
1603
|
return /*#__PURE__*/React.createElement(DataTableRow, {
|
1604
1604
|
key: row.id,
|
1605
|
+
index: index,
|
1605
1606
|
row: row,
|
1606
1607
|
columns: columns,
|
1607
1608
|
onSelect: select,
|
@@ -1610,7 +1611,7 @@ var DataTable = function DataTable(props) {
|
|
1610
1611
|
expanded: expanded
|
1611
1612
|
});
|
1612
1613
|
}) : /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
1613
|
-
colSpan:
|
1614
|
+
colSpan: 1000
|
1614
1615
|
}, /*#__PURE__*/React.createElement("div", {
|
1615
1616
|
className: "empty-message"
|
1616
1617
|
}, /*#__PURE__*/React.createElement(Icon, {
|
@@ -1622,7 +1623,8 @@ var DataTable = function DataTable(props) {
|
|
1622
1623
|
*/
|
1623
1624
|
|
1624
1625
|
var DataTableRow = function DataTableRow(props) {
|
1625
|
-
var
|
1626
|
+
var index = props.index,
|
1627
|
+
row = props.row,
|
1626
1628
|
_props$columns2 = props.columns,
|
1627
1629
|
columns = _props$columns2 === void 0 ? [] : _props$columns2,
|
1628
1630
|
onSelect = props.onSelect,
|
@@ -1641,9 +1643,10 @@ var DataTableRow = function DataTableRow(props) {
|
|
1641
1643
|
onClick: function onClick(ev) {
|
1642
1644
|
return onSelect(row, ev);
|
1643
1645
|
}
|
1644
|
-
}, columns.map(function (column,
|
1646
|
+
}, columns.map(function (column, cindex) {
|
1645
1647
|
return /*#__PURE__*/React.createElement(DataTableCell, {
|
1646
|
-
key: column.id + "_" +
|
1648
|
+
key: column.id + "_" + cindex,
|
1649
|
+
index: index,
|
1647
1650
|
row: row,
|
1648
1651
|
column: column,
|
1649
1652
|
cell: row[column.id],
|
@@ -1667,7 +1670,8 @@ var DataTableRow = function DataTableRow(props) {
|
|
1667
1670
|
|
1668
1671
|
|
1669
1672
|
var DataTableCell = function DataTableCell(_ref4) {
|
1670
|
-
var
|
1673
|
+
var index = _ref4.index,
|
1674
|
+
row = _ref4.row,
|
1671
1675
|
column = _ref4.column,
|
1672
1676
|
cell = _ref4.cell,
|
1673
1677
|
editable = _ref4.editable;
|
@@ -1784,6 +1788,9 @@ var DataTableCell = function DataTableCell(_ref4) {
|
|
1784
1788
|
}
|
1785
1789
|
} else {
|
1786
1790
|
switch (type) {
|
1791
|
+
case "INDEX":
|
1792
|
+
return /*#__PURE__*/React.createElement("span", null, index);
|
1793
|
+
|
1787
1794
|
case "ICON":
|
1788
1795
|
return /*#__PURE__*/React.createElement(Icon, {
|
1789
1796
|
icon: cell
|