Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

flex flex-row not working in array values mapped in VUE

I have created an array of items and mapped them in Vue but I can’t make them to flex-row using Tailwind CSS maybe there is something I don’t know about in tailwind css flex-row feature

<div class="bg-white mt-5 rounded-tr-md rounded-tl-md">
     <!-- Filter menus -->
     <div
       v-for="filter in filterTypes"
       :key="filter.type"
       class="flex flex-row items-center px-5 py-4"
     >
       <div class="">{{ filter.type }}</div>
     </div>
     <!-- Transactions According to Pages-->
     <div></div>
   </div>

The UI that I get back

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You should place flex to the parent element, and there’s no need to flex-row since flex direction is row by default :

<div class="flex items-center bg-white mt-5 rounded-tr-md rounded-tl-md">
     <!-- Filter menus -->
     <div
       v-for="filter in filterTypes"
       :key="filter.type"
       class=" px-5 py-4"
     >
       <div class="">{{ filter.type }}</div>
     </div>
     <!-- Transactions According to Pages-->
     <div></div>
   </div>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading