Skip to content

Commit

Permalink
Merge pull request #151 from rspencer01/bugfix_server_tabs
Browse files Browse the repository at this point in the history
[bugfix] Remove hx-get from options
  • Loading branch information
rspencer01 authored Jan 31, 2025
2 parents fced86c + 3bd8903 commit 7db0f33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pybloqs/server/block/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def _write_contents(self, container: Tag, actual_cfg, id_gen, resource_deps=None

select = append_to(container, "select")
select["hx-target"] = f"#{select_uid}"
select["hx-get"] = ""
# This gets the url from the value of the option
select["hx-on::config-request"] = "event.detail.path = this.value"
select["aria-controls"] = select_uid
select["style"] = "float: right; margin: 0.4em;"

Expand All @@ -56,6 +59,6 @@ def _write_contents(self, container: Tag, actual_cfg, id_gen, resource_deps=None
tab_contents = self.provider_generator(tab_title)
option = append_to(select, "option")
option.string = tab_title
option["hx-get"] = tab_contents.url
option["value"] = tab_contents.url
if n == 0:
content_div["hx-get"] = tab_contents.url

0 comments on commit 7db0f33

Please # to comment.