Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add select option to htmx.ajax() #1985

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

ece-jacob-scott
Copy link
Contributor

Created a PR for this issue #701 and saw that it was "add(ed) to a list" (comment). Hopefully this PR is helpful. Let me know if there are issues, I took some liberties in implementing it how I thought was best but I'm not sure if adding more properties to the responseInfo object is desirable. I added some tests and documentation.

I thought the best API would be that the "HX-Reselect" header value should override the ajax api call but I wasn't sure. Let me know if that is incorrect.

Htmx is a great project thank you for working on it!

@ece-jacob-scott ece-jacob-scott changed the title adds select to ajax api Adding select to ajax api Nov 9, 2023
@alexpetros alexpetros linked an issue Nov 11, 2023 that may be closed by this pull request
@alexpetros alexpetros changed the title Adding select to ajax api Add select option to htmx.ajax() Nov 11, 2023
@alexpetros
Copy link
Collaborator

This looks terrific, thanks for dredging this out of that issue! Will give it a thorough read-through soon, but on first skim this is very well done.

@alexpetros alexpetros added the ready for review Issues that are ready to be considered for merging label Nov 16, 2023
@1cg 1cg merged commit cabff5d into bigskysoftware:dev Nov 16, 2023
1 check passed
@ece-jacob-scott ece-jacob-scott deleted the adds-select-to-ajax-api branch November 18, 2023 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Issues that are ready to be considered for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using htmx.ajax and hx-target
3 participants