@richardmcquiston01/dashboard-widgets-toolkit 0.11.0 → 0.11.1

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/react.cjs CHANGED
@@ -1574,6 +1574,12 @@ function InteractiveTable({
1574
1574
  const searchId = react.useId();
1575
1575
  const [search, setSearch] = react.useState("");
1576
1576
  const [sort, setSort] = react.useState(initialSort);
1577
+ const seed = initialSort === void 0 ? "" : `${initialSort.column}:${initialSort.direction}`;
1578
+ const [seededWith, setSeededWith] = react.useState(seed);
1579
+ if (seededWith !== seed) {
1580
+ setSeededWith(seed);
1581
+ setSort(initialSort);
1582
+ }
1577
1583
  const localeTag = typeof locale === "string" ? locale : locale?.[0];
1578
1584
  const query = {
1579
1585
  page: 1,