@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.
@@ -215,9 +215,7 @@
215
215
  ...defaultStyles$u
216
216
  }, styles2);
217
217
  const svgHeight = labelType === LabelType.hanging && !hideLabels ? height + 20 : height;
218
- const cleanBorderAbbr = (abbrText) => {
219
- return abbrText.split("-")[0];
220
- };
218
+ const cleanBorderAbbr = (abbrText) => abbrText.split("-")[0];
221
219
  const renderLabel = (config, i) => jsxRuntime.jsx("text", {
222
220
  ref: (element) => textElements.current[i] = element,
223
221
  "text-rendering": "optimizeLegibility",
@@ -252,7 +250,6 @@
252
250
  fill: d2.fill
253
251
  },
254
252
  "shape-rendering": "crispEdges"
255
- // stroke={border && var()}
256
253
  }), labelType === LabelType.inline && !hideLabels && renderLabel(labelConfig, index)]
257
254
  }, index);
258
255
  totalWidth += itemWidth;
@@ -1308,9 +1305,11 @@
1308
1305
  if (sortState.columnIndex < 0) {
1309
1306
  return data;
1310
1307
  }
1308
+ const dataCopy = new Array(...data);
1311
1309
  const column = columns[sortState.columnIndex];
1312
1310
  const sortFunction = sortState.ascending ? sortAscending(column.accessor) : sortDescending(column.accessor);
1313
- return data.toSorted(sortFunction);
1311
+ dataCopy.sort(sortFunction);
1312
+ return dataCopy;
1314
1313
  }, [columns, data, sortState]);
1315
1314
  const columnModels = hooks.useMemo(() => {
1316
1315
  return columns.map((column, columnIndex) => {