Skip to content

Commit

Permalink
Update resources/js/datagridfield.pattern.js
Browse files Browse the repository at this point in the history
  • Loading branch information
petschki authored Nov 5, 2024
1 parent 14bfb4d commit bf4f637
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resources/js/datagridfield.pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ export default Base.extend({

var $new_row = $(new_row);
// enable patternslib
$new_row.find('[class*="dgw-disabled-pat-"]').each(function() {
const $element = $(this);
$element.attr('class', function(index, className) {
return className.replace(/\bdgw-disabled-pat-/g, 'pat-');
const disabled_prefix = "dgw-disabled-pat-";
new_row.querySelectorAll(`[class*="${disabled_prefix}"]`).forEach(el => {
el.classList.forEach(cls => {
el.classList.replace(cls, cls.replace(disabled_prefix, "pat-"));
});
});
return new_row;
Expand Down

0 comments on commit bf4f637

Please sign in to comment.