Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 2182ff9

Browse files
authored
Merge pull request #1689 from balena-io-modules/fix-selection
Fix compatibility with selection without server side pagination
2 parents dc59f64 + 7cfa06e commit 2182ff9

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/components/Filters/FilterModal.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ export const FilterModal = ({
117117
const isValid = (
118118
signs: FilterSignatureInternal[],
119119
): signs is Array<
120-
typeof signatures[number] &
121-
Required<Pick<typeof signatures[number], 'field' | 'operator' | 'value'>>
120+
(typeof signatures)[number] &
121+
Required<
122+
Pick<(typeof signatures)[number], 'field' | 'operator' | 'value'>
123+
>
122124
> =>
123125
signs.every(
124126
(s) => s.field && s.operator && s.value != null && s.value !== '',

src/components/Table/TableBase.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,9 @@ export class TableBase<T extends {}> extends React.Component<
391391
public toggleAllChecked = () => {
392392
const { data, onCheck, rowKey, pagination } = this.props;
393393

394-
let checkedItems: T[] | undefined;
394+
let checkedItems: T[] | undefined = !pagination?.serverSide
395+
? []
396+
: undefined;
395397

396398
if (
397399
data &&

src/unstable-temp/DownloadImageModal/OsConfiguration.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ interface OsConfigurationProps {
5454

5555
const BuildVariants = ['dev', 'prod'] as const;
5656

57-
export type BuildVariant = typeof BuildVariants[number];
57+
export type BuildVariant = (typeof BuildVariants)[number];
5858

5959
const getCategorizedVersions = (
6060
deviceTypeOsVersions: OsVersionsByDeviceType,

src/unstable-temp/DownloadImageModal/OsTypeSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const OsTypeSelector = ({
9191
);
9292

9393
return (
94-
<Select<typeof selectOsTypes[number]>
94+
<Select<(typeof selectOsTypes)[number]>
9595
id="newAppApplicationType"
9696
options={selectOsTypes}
9797
valueKey="slug"

0 commit comments

Comments
 (0)