@guardian/interactive-component-library 0.1.0-alpha.30 → 0.1.0-alpha.31

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.
@@ -219,9 +219,7 @@ function StackedBar({
219
219
  ...defaultStyles$u
220
220
  }, styles2);
221
221
  const svgHeight = labelType === LabelType.hanging && !hideLabels ? height + 20 : height;
222
- const cleanBorderAbbr = (abbrText) => {
223
- return abbrText.split("-")[0];
224
- };
222
+ const cleanBorderAbbr = (abbrText) => abbrText.split("-")[0];
225
223
  const renderLabel = (config, i) => jsx("text", {
226
224
  ref: (element) => textElements.current[i] = element,
227
225
  "text-rendering": "optimizeLegibility",
@@ -256,7 +254,6 @@ function StackedBar({
256
254
  fill: d2.fill
257
255
  },
258
256
  "shape-rendering": "crispEdges"
259
- // stroke={border && var()}
260
257
  }), labelType === LabelType.inline && !hideLabels && renderLabel(labelConfig, index)]
261
258
  }, index);
262
259
  totalWidth += itemWidth;
@@ -1312,9 +1309,11 @@ function useTable({
1312
1309
  if (sortState.columnIndex < 0) {
1313
1310
  return data;
1314
1311
  }
1312
+ const dataCopy = new Array(...data);
1315
1313
  const column = columns[sortState.columnIndex];
1316
1314
  const sortFunction = sortState.ascending ? sortAscending(column.accessor) : sortDescending(column.accessor);
1317
- return data.toSorted(sortFunction);
1315
+ dataCopy.sort(sortFunction);
1316
+ return dataCopy;
1318
1317
  }, [columns, data, sortState]);
1319
1318
  const columnModels = useMemo(() => {
1320
1319
  return columns.map((column, columnIndex) => {