@steedos-widgets/sortable 6.3.2 → 6.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58569,18 +58569,19 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
58569
58569
  }
58570
58570
  let toolbarReloadButton;
58571
58571
  const onReloadScript = `
58572
- // const scope = event.context.scoped;
58573
- // var listView = scope.parent.getComponents().find(function(n){
58574
- // return n.props.type === "crud";
58575
- // });
58576
- // listView.handleChangePage(1);
58577
-
58578
-
58579
58572
  // 触发搜索,而不是reload,因为使用search-box可以在amissdk是3.6.3-patch.8+实现在非第一页的情况下,快速搜索输入框中过滤条件变更时再点刷新可以自动跳转翻页到第一页
58580
58573
  const scope = event.context.scoped;
58581
58574
  const sb = SteedosUI.getClosestAmisComponentByType(scope, "search-box");
58582
- const sbValue = sb.state.value;
58583
- sb.handleSearch(sbValue);
58575
+ if (sb) {
58576
+ const sbValue = sb.state.value;
58577
+ sb.handleSearch(sbValue);
58578
+ }else{
58579
+ var listView = scope.parent.getComponents().find(function(n){
58580
+ return n.props.type === "crud";
58581
+ });
58582
+ listView.handleChangePage(1);
58583
+ }
58584
+
58584
58585
  `;
58585
58586
  toolbarReloadButton = {
58586
58587
  // "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页,这在加载更多按钮的翻页模式下会有问题