October 22, 2024
Chicago 12, Melborne City, USA
javascript

javsacript react pagination when 5 columns data in a row


I tired to show five blocks in the ui view. on click of next button next five data should display and hide first 5 data block like that click on next button ,display next set of 5. my code here using javscript/react

.parent{
    display: flex;
}

.child{
    margin: 2% 0 0 0;
    width: 33%;
}

 <div className="parent"  >
              {list &&  
              list.data.map((item, index) => (
                <div key={index} className="child">
                  {item.name}
                </div>
            ))}
           </div>

enter image description here



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video