Skip to content

Clearing value of dependent fields  #79

Closed
@tyctor

Description

@tyctor

Clearing value of dependent fields not working for multiple dependent fields

for me this selector will not match if there are multiple field names

$('[data-select2-dependent-fields=' + name + ']').each(function () {
          $(this).val('').trigger('change')
})

what is working for me is to change it like this

$("[data-select2-dependent-fields~='" + name + "']").each(function () {
          $(this).val('').trigger('change')
})

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions