From 1eb6d5f1865c80eb4e228e34774ce18743b97905 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Thu, 12 Dec 2019 21:13:25 +0530 Subject: :bug: * Fixes/Removed javascript:void(0) from links (Since React v16.9 unsafe script is not allowed) * Fixes Paginator callback null conditions --- src/shared/paginator.component.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/shared/paginator.component.js') diff --git a/src/shared/paginator.component.js b/src/shared/paginator.component.js index 9512d4e..928a89d 100644 --- a/src/shared/paginator.component.js +++ b/src/shared/paginator.component.js @@ -13,15 +13,21 @@ const Paginator = (props) => { } const onPrevious = ()=>{ - props.previousPage(); + if(props.previousPage){ + props.previousPage(); + } } const onNext = ()=>{ - props.nextPage(); + if(props.nextPage){ + props.nextPage(); + } } const onPageClick = (pageNum)=>{ - props.goToNextPage(pageNum) + if(props.goToNextPage){ + props.goToNextPage(pageNum); + } } @@ -29,18 +35,18 @@ const Paginator = (props) => { -- cgit v1.2.3