You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reason for using button instead Button is due to width issues that I wasn't able to resolve in style/className of the Button component.
for <button className={mergeClasses(eventPageClasses.paginationButton, eventPageClasses.paginationButtonActive)}>1</button>, the eventPageClasses.paginationButtonActive should be conditionally activated.
Suggestions
To manage page number overflow create truncate props,
The number button should have variations such as circular (perfect circle where the dimensions of button should be 1:1 - not like the picture above), button, no-shape, e.t.c..
It is recommended to have a dedicated Toolbar component for pagination so it can store the basic component and a dropdown that can set data display limit (by passing a number Array )
Last, but not the least, check comments for valuable ideas that can be incorporated to the component.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This help in handling large data load and saves time for developing custom pagination.
Below is a sample scenario for pagination.
Sample Props
Toolbar
Component as container.Button
component,button
tag with following modifications:HTML
Griffel Styling (using
makeStyles()
)<button className={mergeClasses(eventPageClasses.paginationButton, eventPageClasses.paginationButtonActive)}>1</button>
, theeventPageClasses.paginationButtonActive
should be conditionally activated.Suggestions
truncate
props,circular
(perfect circle where the dimensions of button should be 1:1 - not like the picture above),button
,no-shape
, e.t.c..Toolbar
component for pagination so it can store the basic component and a dropdown that can set data display limit (by passing anumber Array
)Beta Was this translation helpful? Give feedback.
All reactions