Skip to content

Commit

Permalink
bug(TS): Update deps to latest versions: (#1524)
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Jul 15, 2024
1 parent aa90a27 commit 6611277
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 251 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Fixed #1440: When a Shiny Express app with a `www/` subdirectory was deployed to shinyapps.io or a Connect server, it would not start correctly. (#1442)

* Fixed #1498: Update table related TypeScript dependencies to their latest versions. This fixed an issue where the Row Virtualizer would scroll to the end when hidden. This would cause the DOM to update numerous times, locking up the browser tab for multiple seconds. #1524

* The return type for the data frame patch function now returns a list of `render.CellPatch` objects (which support `htmltools.TagNode` for the `value` attribute). These values will be set inside the data frame's `.data_view()` result. This also means that `.cell_patches()` will be a list of `render.CellPatch` objects. (#1526)

### Other changes
Expand Down
4 changes: 2 additions & 2 deletions js/data-frame/filter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ColumnFiltersOptions,
ColumnFiltersState,
FilterMeta,
FiltersOptions,
Header,
Row,
getFacetedMinMaxValues,
Expand All @@ -25,7 +25,7 @@ export function useFilters<TData>(enabled: boolean | undefined): {
columnFilters: ColumnFiltersState;
setColumnFilters: React.Dispatch<React.SetStateAction<ColumnFiltersState>>;
columnFiltersState: { columnFilters: ColumnFiltersState };
filtersTableOptions: FiltersOptions<TData>;
filtersTableOptions: ColumnFiltersOptions<TData>;
} {
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]); // can set initial column filter state here

Expand Down
3 changes: 2 additions & 1 deletion js/data-frame/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,11 @@ const ShinyDataGrid: FC<ShinyDataGridProps<unknown>> = ({
count: table.getFilteredRowModel().rows.length,
getScrollElement: () => containerRef.current,
estimateSize: () => 31,
overscan: 15,
paddingStart: theadRef.current?.clientHeight ?? 0,
// In response to https://github.com/posit-dev/py-shiny/pull/538/files#r1228352446
// (the default scrollingDelay is 150)
scrollingDelay: 10,
isScrollingResetDelay: 10,
});

// Reset scroll when dataset changes
Expand Down
2 changes: 1 addition & 1 deletion js/data-frame/table-summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import React, { useMemo } from "react";
export function useSummary(
summaryTemplate: string | boolean | undefined,
scrollContainer: HTMLElement | null,
virtualRows: VirtualItem[],
virtualRows: VirtualItem<Element>[],
thead: HTMLTableSectionElement | null,
nrows: number
): JSX.Element | null {
Expand Down
Loading

0 comments on commit 6611277

Please sign in to comment.