Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

390
Views
¿Cómo paginar en reaccionar usando inercia en laravel?

¿Cómo paginar en react usando inertia en laravel ?

tirando de los datos paginados:

 $contacts = Contact::orderBy('name', 'asc')->paginate(10); return Inertia::render('Contacts/index', [ 'contacts' => $contacts ]);

Sé cómo representar los enlaces en la blade ( {{ $contacts->links() }} ), pero ¿hay alguna manera de hacerlo así por inertia o necesito crear mi propio componente para los enlaces de paginación?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

La forma más fácil es crear su propio componente con los enlaces (aún están ahí)

Este es un ejemplo en vue, pero debería ser fácil de portar para reaccionar:

 <template> <div> <div class="flex flex-wrap -mb-1"> <template v-for="(link, key) in links" :key="key"> <div v-if="link.url === null" class="mr-1 mb-1 px-4 py-3 text-sm leading-4 text-gray-400 border rounded" v-html="link.label" /> <inertia-link v-else class="mr-1 mb-1 px-4 py-3 text-sm leading-4 border rounded hover:bg-white focus:border-indigo-500 focus:text-indigo-500" :class="{ 'bg-blue-700 text-white': link.active }" :href="link.url" v-html="link.label" /> </template> </div> </div> </template> <script> export default { props: { links: Array }, } </script>
about 4 years ago · Juan Pablo Isaza Report

0

Puede probar esto para obtener un mejor resultado para reaccionar: -

 import DataTable from "react-data-table-component"; <DataTable style={{ background: "transparent" }} title="User" columns={columns} data={allData} defaultSortFieldId={1} sortIcon={<ArrowUpwardIcon />} pagination />
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!