@gpa-gemstone/react-table 1.2.24 → 1.2.25

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/lib/Table.js +4 -4
  2. package/package.json +1 -1
package/lib/Table.js CHANGED
@@ -92,9 +92,8 @@ function HeaderCell(props) {
92
92
  style.position = 'relative';
93
93
  }
94
94
  return (React.createElement("th", { style: style, onClick: function (e) { return props.Click(e); } },
95
- React.createElement("div", { style: { position: 'absolute', width: 25 } },
96
- React.createElement(RenderAngleIcon, { SortKey: props.SortKey, Key: props.DataKey, Ascending: props.Ascending })),
97
- React.createElement("div", { style: { marginLeft: 25 } }, props.Label)));
95
+ React.createElement(RenderAngleIcon, { SortKey: props.SortKey, Key: props.DataKey, Ascending: props.Ascending }),
96
+ React.createElement("div", { style: { marginLeft: (props.SortKey === props.DataKey ? 25 : 0) } }, props.Label)));
98
97
  }
99
98
  function RenderAngleIcon(props) {
100
99
  var AngleIcon = function (a) { return a.ascending ? gpa_symbols_1.SVGIcons.ArrowDropUp : gpa_symbols_1.SVGIcons.ArrowDropDown; };
@@ -102,6 +101,7 @@ function RenderAngleIcon(props) {
102
101
  return null;
103
102
  if (props.SortKey !== props.Key)
104
103
  return null;
105
- return React.createElement(AngleIcon, { ascending: props.Ascending });
104
+ return React.createElement("div", { style: { position: 'absolute', width: 25 } },
105
+ React.createElement(AngleIcon, { ascending: props.Ascending }));
106
106
  }
107
107
  ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpa-gemstone/react-table",
3
- "version": "1.2.24",
3
+ "version": "1.2.25",
4
4
  "description": "Table for GPA web applications",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",