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