Skip to content

Commit

Permalink
Merge branch 'develop' into feature/sso-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhlongviolin1 authored Sep 30, 2024
2 parents 80ab615 + 9a5a6c5 commit 6ce4d30
Show file tree
Hide file tree
Showing 10 changed files with 206 additions and 176 deletions.
88 changes: 44 additions & 44 deletions frontend/taipy-gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jest.mock(
children({ height: 600, width: 600 })
);

const valueKey = "Infinite-Entity--asc";
const valueKey = "Infinite-Entity-asc";
const tableValue = {
[valueKey]: {
data: [
Expand Down
16 changes: 4 additions & 12 deletions frontend/taipy-gui/src/components/Taipy/AutoLoadingTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
} from "../../context/taipyReducers";
import {
ColumnDesc,
FilterDesc,
getSortByIndex,
Order,
TaipyTableProps,
Expand All @@ -64,6 +65,7 @@ import {
OnRowClick,
DownloadAction,
getFormatFn,
getPageKey,
} from "./tableUtils";
import {
useClassNames,
Expand All @@ -74,7 +76,7 @@ import {
useFormatConfig,
useModule,
} from "../../utils/hooks";
import TableFilter, { FilterDesc } from "./TableFilter";
import TableFilter from "./TableFilter";
import { getSuffixedClassNames, getUpdateVar } from "./utils";
import { emptyArray } from "../../utils";

Expand Down Expand Up @@ -383,19 +385,9 @@ const AutoLoadingTable = (props: TaipyTableProps) => {
page.current.promises[startIndex].reject();
}
return new Promise<void>((resolve, reject) => {
const agg = aggregates.length
? colsOrder.reduce((pv, col, idx) => {
if (aggregates.includes(columns[col].dfid)) {
return pv + "-" + idx;
}
return pv;
}, "-agg")
: "";
const cols = colsOrder.map((col) => columns[col].dfid).filter((c) => c != EDIT_COL);
const afs = appliedFilters.filter((fd) => Object.values(columns).some((cd) => cd.dfid === fd.col));
const key = `Infinite-${cols.join()}-${orderBy}-${order}${agg}${afs.map(
(af) => `${af.col}${af.action}${af.value}`
)}`;
const key = getPageKey(columns, "Infinite", cols, orderBy, order, afs, aggregates, styles, tooltips, formats);
page.current = {
key: key,
promises: { ...page.current.promises, [startIndex]: { resolve: resolve, reject: reject } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { TaipyContext } from "../../context/taipyContext";
import { TaipyState, INITIAL_STATE } from "../../context/taipyReducers";
import { TableValueType } from "./tableUtils";

const valueKey = "0-99-Entity,Daily hospital occupancy--asc";
const valueKey = "0-99-Entity,Daily hospital occupancy-asc";
const tableValue = {
[valueKey]: {
data: [
Expand Down Expand Up @@ -110,7 +110,7 @@ const changedValue = {
};

const editableValue = {
"0--1-bool,int,float,Code--asc": {
"0--1-bool,int,float,Code-asc": {
data: [
{
bool: true,
Expand All @@ -137,7 +137,7 @@ const editableColumns = JSON.stringify({
});

const buttonImgValue = {
"0--1-bool,int,float,Code--asc": {
"0--1-bool,int,float,Code-asc": {
data: [
{
bool: true,
Expand Down Expand Up @@ -311,7 +311,7 @@ describe("PaginatedTable Component", () => {
end: 199,
id: "table",
orderby: "",
pagekey: "100-199-Entity,Daily hospital occupancy--asc",
pagekey: "100-199-Entity,Daily hospital occupancy-asc",
handlenan: false,
sort: "asc",
start: 100,
Expand Down
Loading

0 comments on commit 6ce4d30

Please sign in to comment.