Skip to content

Commit

Permalink
DHFPROD-8593: Pagination not working in table and snippet view in exp…
Browse files Browse the repository at this point in the history
…lore
  • Loading branch information
xnikhil08 authored and SameeraPriyathamTadikonda committed Mar 14, 2022
1 parent 2c3ee1a commit c866e19
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion marklogic-data-hub-central/ui/src/pages/Browse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ const Browse: React.FC<Props> = ({location}) => {
const [parsedFacets, setParsedFacets] = React.useState<any[]>([]);
const [selectedView, setSelectedView] = useState<ViewType>(viewOptions.graphView? ViewType.graph : ViewType.table ? ViewType.table : ViewType.snippet);

const searchResultDependencies = [
searchOptions.pageLength,
searchOptions.start,
searchOptions.pageNumber,
viewOptions.tableView,
searchOptions.database,
searchOptions.entityTypeIds,
searchOptions.nextEntityType,
searchOptions.query,
searchOptions.selectedFacets,
user.error.type,
hideDataHubArtifacts
];

const isGraphView = () => {
const isGraph = searchOptions.nextEntityType !== "All Data" && viewOptions.graphView;
return isGraph;
Expand Down Expand Up @@ -342,7 +356,7 @@ const Browse: React.FC<Props> = ({location}) => {
}
fetchUpdatedSearchResults();

}, [viewOptions.tableView, searchOptions.database, searchOptions.entityTypeIds, searchOptions.nextEntityType, searchOptions.query, searchOptions.selectedFacets, user.error.type, hideDataHubArtifacts]);
}, searchResultDependencies);

useEffect(() => {
let baseEntitiesSelected = searchOptions.entityTypeIds.length > 0;
Expand Down

0 comments on commit c866e19

Please sign in to comment.