动态生成的内容包含pattern options时,必须重新扫描注册

动态生成的内容包含pattern options时,必须重新扫描注册
require([
  'pat-registry'
], function(registry){
  // do something where it needs to scan...
  registry.scan($('.selector-to-contents-to-rescan'));
});

参考连接:Re-scanning patterns registry breaks select2...or, how does one inject a pattern into the registry from an add-on - Plone Support / Add-on Development - Plone Community

设置