Skip to content

Commit

Permalink
Fixed dynamic chaning of the required option in j-ListForm.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Jun 14, 2024
1 parent 0e13bb7 commit 2dbac77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion j-ListForm/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,16 @@ COMPONENT('listform', 'empty:---;default:1;', function(self, config, cls) {
});
};

self.configure = function(key, value) {
self.configure = function(key, value, init) {
switch (key) {
case 'disabled':
self.tclass('ui-' + key, !!value);
self.find('button[name="create"]').prop('disabled', !!value);
break;
case 'required':
self.tclass(cls + '-' + key, !!value);
if (!init)
self.validate2();
break;
}
};
Expand Down
2 changes: 1 addition & 1 deletion j-ListForm/component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"datecreated": "2020-02-13T13:30:06.000Z",
"dateupdated": "2024-06-10T10:09:00.000Z",
"dateupdated": "2024-06-14T13:10:00.000Z",
"name": "j-ListForm",
"tags": [
"list",
Expand Down

0 comments on commit 2dbac77

Please sign in to comment.