Skip to content

Commit 12612c9

Browse files
committed
Update select.js
Properly handle HTML5 data attributes
1 parent 4fb06e6 commit 12612c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/select.js

+2
Original file line numberDiff line numberDiff line change
@@ -1177,13 +1177,15 @@
11771177

11781178
var transcludedMatch = transcluded.querySelectorAll('.ui-select-match');
11791179
transcludedMatch.removeAttr('ui-select-match'); //To avoid loop in case directive as attr
1180+
transcludedMatch.removeAttr('data-ui-select-match'); // Properly handle HTML5 data-attributes
11801181
if (transcludedMatch.length !== 1) {
11811182
throw uiSelectMinErr('transcluded', "Expected 1 .ui-select-match but got '{0}'.", transcludedMatch.length);
11821183
}
11831184
element.querySelectorAll('.ui-select-match').replaceWith(transcludedMatch);
11841185

11851186
var transcludedChoices = transcluded.querySelectorAll('.ui-select-choices');
11861187
transcludedChoices.removeAttr('ui-select-choices'); //To avoid loop in case directive as attr
1188+
transcludedChoices.removeAttr('data-ui-select-choices'); // Properly handle HTML5 data-attributes
11871189
if (transcludedChoices.length !== 1) {
11881190
throw uiSelectMinErr('transcluded', "Expected 1 .ui-select-choices but got '{0}'.", transcludedChoices.length);
11891191
}

0 commit comments

Comments
 (0)