mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-09-06 14:46:44 +08:00
hotfix: N2N init trigger
This commit is contained in:
parent
cb9e48b488
commit
fdc365a51d
1 changed files with 7 additions and 5 deletions
|
@ -2453,12 +2453,14 @@ class RbFormN2NReference extends RbFormReference {
|
|||
ids.push(item.id)
|
||||
}
|
||||
})
|
||||
if (ids.length > 0) this.__select2.trigger('change')
|
||||
|
||||
if (ids.length > 0) {
|
||||
let ss = ids.join(',')
|
||||
if (append && currentIds && currentIds !== '') ss = currentIds + ',' + ss
|
||||
this.handleChange({ target: { value: ss } }, true)
|
||||
}
|
||||
// v4.0.5 禁用,因为初始化时就会触发
|
||||
// if (ids.length > 0) {
|
||||
// let ss = ids.join(',')
|
||||
// if (append && currentIds && currentIds !== '') ss = currentIds + ',' + ss
|
||||
// this.handleChange({ target: { value: ss } }, true)
|
||||
// }
|
||||
} else {
|
||||
this.__select2.val(null).trigger('change')
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue