Skip to content

Commit 379dcf1

Browse files
committed
chore: revert previous commit
1 parent 8574dd9 commit 379dcf1

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

  • packages/pluggableWidgets/gallery-native/src

packages/pluggableWidgets/gallery-native/src/Gallery.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { extractFilters } from "./utils/filters";
1313
import { FilterCondition } from "mendix/filters";
1414
import { Gallery as GalleryComponent, GalleryProps as GalleryComponentProps } from "./components/Gallery";
1515
import { GalleryProps } from "../typings/GalleryProps";
16-
import { ObjectItem, ValueStatus } from "mendix";
16+
import { ObjectItem } from "mendix";
1717

1818
export const Gallery = (props: GalleryProps<GalleryStyle>): ReactElement => {
1919
const viewStateFilters = useRef<FilterCondition | undefined>(undefined);
@@ -29,18 +29,6 @@ export const Gallery = (props: GalleryProps<GalleryStyle>): ReactElement => {
2929
}
3030
}, [props.datasource, props.pageSize]);
3131

32-
useEffect(() => {
33-
if (props.datasource.status === ValueStatus.Available) {
34-
return;
35-
}
36-
const intervalId = setInterval(() => {
37-
props.datasource.reload();
38-
if (props.datasource.status === ValueStatus.Available) {
39-
clearInterval(intervalId); // Break the interval
40-
}
41-
}, 1000);
42-
}, [props.datasource.items]);
43-
4432
useEffect(() => {
4533
if (props.datasource.filter && !filtered && !viewStateFilters.current) {
4634
viewStateFilters.current = props.datasource.filter;

0 commit comments

Comments
 (0)