AEM6.3 contains /libs/cq/gui/components/authoring/dialog/dropdownshowhide/clientlibs/dropdownshowhide/js/dropdownshowhide.js
At lines 49-50 there is this code:
// get the selector to find the target elements. its stored as data-.. attribute
var target = $(element).data("cqDialogDropdownShowhideTarget");
AFAIK data attributes are always lowercase. This is certainly the case if the data attributes are generated via granite:data node as per Common Attributes — Granite UI 1.0 documentation
When I change the code to
var target = $(element).data("cqdialogdropdownshowhidetarget");
my select component works correctly.
Am I missing something?
This is ok. Camelcase is converted into kebab-case by jquery. See https://api.jquery.com/data/#data-html5. Does the HTML reflect that?
Yes, this is correct provided I generate my data attribute using
<granite:data jcr:primaryType="nt:unstructured" cq-dialog-dropdown-showhide-target=".list-option-listfrom-showhide-target">