stimulus-autocomplete icon indicating copy to clipboard operation
stimulus-autocomplete copied to clipboard

Close if empty html

Open elalemanyo opened this issue 3 years ago • 4 comments

I think it makes more sense to open the results only when there are results. In my case, this resulted in some style inconsistencies.

shot2022-11-16 at 16 37 59@2x

elalemanyo avatar Nov 16 '22 15:11 elalemanyo

Deploy Preview for stimulus-autocomplete ready!

Name Link
Latest commit b3e3f3d33cd9c7b109a46341c089791cf35aa9e0
Latest deploy log https://app.netlify.com/sites/stimulus-autocomplete/deploys/63eaa6f44d08750008fcd686
Deploy Preview https://deploy-preview-124--stimulus-autocomplete.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Nov 16 '22 15:11 netlify[bot]

@ACPK did you check the example? https://github.com/afcapel/stimulus-autocomplete/pull/124/files

elalemanyo avatar Mar 01 '23 06:03 elalemanyo

@elalemanyo Yes but the Rails example should be updated to reflect the change.

I found that HTML (from this PR) returns true due to a code comment with the name of the controller.

Doesn't work: render layout: false if [email protected]?

It could be resolved in Rails 7 by adding the following code to the controller.

Works: head 200, content_type: "text/html" if [email protected]?

ACPK avatar Mar 01 '23 21:03 ACPK

@afcapel Is there any possibility to merge this? We believe it could be of interest to other users. Thanks

elalemanyo avatar May 10 '23 10:05 elalemanyo