fmihel-windeco-components 2.0.0-beta.5 → 2.0.0-beta.6

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.
@@ -11,6 +11,7 @@ function TBody({
11
11
  onClick,
12
12
  }) {
13
13
  const haveData = (Array.isArray(data) && data.length > 0);
14
+
14
15
  return (
15
16
  <tbody>
16
17
  {(haveData) && data.map((row, i) => <TR
@@ -18,7 +19,7 @@ function TBody({
18
19
  data = {data}
19
20
  row={row}
20
21
  fields={fields}
21
- select={aliasId in row && select.find((id) => id == row[aliasId])}
22
+ select={aliasId in row && select.findIndex((id) => `${id}` === `${row[aliasId]}`) > -1}
22
23
  onClick={onClick}
23
24
  aliasId = {aliasId}
24
25
  />)}
package/jsx/Table.jsx CHANGED
@@ -12,6 +12,7 @@ function Table({
12
12
  noData = Table.global.noData,
13
13
  footer = Table.global.footer,
14
14
  select = [],
15
+ style = { ...Table.global.style },
15
16
  onClick = undefined,
16
17
 
17
18
  }) {
@@ -21,6 +22,7 @@ function Table({
21
22
  type="table"
22
23
  {...(className ? { className } : {})}
23
24
  {...(id ? { id } : {})}
25
+ style={{ ...Table.global.style, ...style }}
24
26
  >
25
27
  {(header !== false) && <THead fields={fields} header={header}/>}
26
28
  {<TBody
@@ -44,6 +46,7 @@ Table.global = {
44
46
  header: true, // string true false
45
47
  noData: 'no data', // string or false
46
48
  footer: 'end', // string ot false
49
+ style: {},
47
50
  };
48
51
 
49
52
  export default Table;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmihel-windeco-components",
3
- "version": "2.0.0-beta.5",
3
+ "version": "2.0.0-beta.6",
4
4
  "description": "components for orders windeco",
5
5
  "main": "dist/windeco-components.js",
6
6
  "scripts": {