Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the pagination #196

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dikshashukla455
Copy link
Contributor

Issue Number

fixes #195

Describe the changes you've made

I had made pagination arrows disable/hidden along with their text ('prev' and 'next') when the pagination is not needed.

Describe if there is any unusual behavior (Any Warning) of your code(Write NA if there isn't)

N/A

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • The title of my pull request is a short description of the requested changes.

Provide a Deployed link of route/page that needs to review

Preview: Deploy preview link here with the appropriate route

http://localhost:3000/

@@ -28,6 +28,7 @@
font-weight: bold;
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this addition

@@ -44,7 +44,10 @@ const Pagination = (props) => {
}
}}
>
<EOS_KEYBOARD_ARROW_LEFT className='eos-icons eos-18' />
<EOS_KEYBOARD_ARROW_LEFT
color={`${currNumber <= 1 ? '#bbb' : ''}`}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this solution. It is only changing the icon color, but the element will remain in the DOM. We need to skip the element injection in the DOM altogether

Copy link
Member

@cyntss cyntss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested

@dikshashukla455
Copy link
Contributor Author

dikshashukla455 commented Mar 29, 2022

Changes requested

Greetings @cyntss, the main issue is the icon visibility actually. The whole injection has already skipped the DOM altogether. There is the main span class that has the condition for hiding the 'prev' and 'next' buttons when pagination is not needed but it doesn't change the icon's color because EOS icons have their several own props which color prop is one of them. I just changed the icon visibility color which matches the text with the help of the 'color' prop when pagination is not required. It works perfectly fine in the browser. You can see this hosted link http://localhost:3000/. Kindly review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination arrow icons along with text( 'prev' and 'next') should be hidden/disabled if they are not needed.
2 participants