Closed (fixed)
Project:
HTMX
Version:
1.3.x-dev
Component:
Drupal Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
17 Nov 2024 at 13:48 UTC
Updated:
25 Nov 2024 at 13:54 UTC
Jump to comment: Most recent
Two of the request headers used by HTMX use the HTML id property. Since these can be dynamic in Drupal, a data-drupal-selector is provided by core.
Add to `htmxDrupalPageState()`
// Swap in drupal data selectors as #id values are altered to be unique.
configRequestEvent.detail.headers['HX-Target'] = configRequestEvent.detail.target.dataset.drupalSelector;
configRequestEvent.detail.headers['HX-Trigger'] = configRequestEvent.detail.elt.dataset.drupalSelector;
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
fathershawnComment #5
fathershawn