django-crispy-forms / crispy-tailwind

A Tailwind template pack for django-crispy-forms
MIT License
329 stars 56 forks source link

Duplicate arrows appearing outside of the dropwdown box. Arrows are large and very striking. #128

Open LewisFletcher opened 1 year ago

LewisFletcher commented 1 year ago

I saw a similar bug posted a few days ago. The bug is coming from the below line of code, which appears duplicated in the HTML inpector. I'm not sure why it is so large either.

https://github.com/django-crispy-forms/crispy-tailwind/blob/91c35473f479800e85f60b1fa4d0cf5fc0127f2c/crispy_tailwind/templates/tailwind/layout/select.html#L10

Picture of the arrows: image

LewisFletcher commented 1 year ago

Simply removing the entire svg from the 'layout/select.html' fixed this bug without causing any issues with the form. Heads up for anyone running into this bug.

kylebradshaw commented 1 year ago

fwiw as a stop gap I'm hiding the svg's in css

select ~ .pointer-events-none {
    display: none !important;
}
GitRon commented 6 months ago

I have the same issue. Is there an official fix yet? Seems pretty straight forward, right?

carltongibson commented 6 months ago

@GitRon Maybe it needs someone to make a PR 🤔

GitRon commented 6 months ago

@carltongibson Would be happy to provide one! I'm just a little worried that nobody would review it like this one. 😟

carltongibson commented 6 months ago

Yep, you might need to deploy your branch.

Also, confirming that the linked PR works for you would be useful info.

Also you can make a combined PR saying which issues you've resolved so it's easier to see where you've got to.

Likely then you can be asked to help maintain

LewisFletcher commented 6 months ago

I attempted a fix here but couldn't pass the checks.

GitRon commented 6 months ago

After working a little with Tailwind and this package, I realised that initially I only had this issue because Tailwind CLI didn't find the templates of this package. I created a PR for the docs: https://github.com/django-crispy-forms/crispy-tailwind/pull/145

I think having to copy&paste the solution from Carltons blog is ok'ish but as a dev I'm used to more convenience. When I start the next larger project I'll think about adding Carltons changes to this package and update the docs accordingly.