Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug when pattern class is not the first one, after adding a new row #199

Merged
merged 7 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/198.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix bug when pattern class is not the first one, after adding a new row.
[frapell]
9 changes: 5 additions & 4 deletions resources/js/datagridfield.pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,12 @@ export default Base.extend({

var $new_row = $(new_row);
// enable patternslib
$new_row
.find('*[class^="dgw-disabled-pat-"]')
.attr("class", function (i, cls) {
return cls.replace(/dgw\-disabled-pat-/, "pat-");
$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-');
});
});
petschki marked this conversation as resolved.
Show resolved Hide resolved
return new_row;
},

Expand Down

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading
Loading