Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Autocomplete object should be wrapped in a div #2316

Open
TheWitness opened this issue Nov 27, 2024 · 4 comments
Open

Autocomplete object should be wrapped in a div #2316

TheWitness opened this issue Nov 27, 2024 · 4 comments

Comments

@TheWitness
Copy link

TheWitness commented Nov 27, 2024

So, I'm trying to use the widget factory to build out a version of autocomplete that emulates select2() with a search box below the selected item and above the items themselves and having some difficulty.

It may be my lack of experience with the factory. However from my perspective, this would be much easier if instead of autocomplete object being simply a ul, it would be a ul wrapped by a div.

Is this something that the jQueryUI Team would consider? I would love to hear your comments on this topic.

@TheWitness
Copy link
Author

As seen below, I've been able to do this with Eric Hynds jQueryMultiselect, but am struggling using Autocomplete.

image

image

@TheWitness
Copy link
Author

We have used a simple hack to update selectmenu() to show a search as shown below. It was strait forward.

image

image

But Autocomplete has no such wrapper.

@TheWitness TheWitness changed the title Auto complete object should be wrapped in a div Autocomplete object should be wrapped in a div Nov 27, 2024
@mgol
Copy link
Member

mgol commented Nov 29, 2024

Thanks for the report.

All changes to the widget structure are risky. Given limited team resources, issues like that are not likely to be fixed by the UI team; see the project status at https://blog.jqueryui.com/2021/10/jquery-maintainers-update-and-transition-jquery-ui-as-part-of-overall-modernization-efforts/.

Feel free to try preparing such a patch; it'd be interesting to see how many tests would fail. But I'm not optimistic we'd include such a modification in the widget.

@TheWitness
Copy link
Author

Yea, I was poking around with it and was just coming up to speed when I said to myself "whoever wrote this could fix it in like 10 minutes, I'll take 4 hours". So, I held out burning more time on it. Knowing the state of things, I'll take another crack at it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Development

No branches or pull requests

2 participants