@steedos-widgets/amis-lib 1.2.37 → 1.2.38

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.
package/dist/index.esm.js CHANGED
@@ -5393,18 +5393,27 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
5393
5393
 
5394
5394
  }
5395
5395
 
5396
- function getObjectFooterToolbar(mainObject, formFactor) {
5396
+ function getObjectFooterToolbar(mainObject, formFactor, options) {
5397
5397
  if (formFactor === 'SMALL') {
5398
5398
  return [
5399
5399
  "load-more",
5400
5400
  ]
5401
5401
  }
5402
5402
  else {
5403
- return [
5404
- "switch-per-page",
5405
- "statistics",
5406
- "pagination"
5407
- ]
5403
+ if(options && options.isRelated){
5404
+ return [
5405
+ "statistics",
5406
+ "pagination"
5407
+ ]
5408
+
5409
+ }
5410
+ else {
5411
+ return [
5412
+ "switch-per-page",
5413
+ "statistics",
5414
+ "pagination"
5415
+ ]
5416
+ }
5408
5417
  }
5409
5418
  }
5410
5419
 
@@ -9626,6 +9635,7 @@ async function getObjectCRUD(objectSchema, fields, options){
9626
9635
  // headerToolbar: getObjectHeaderToolbar(objectSchema, options.formFactor, {showDisplayAs}),
9627
9636
  headerToolbarClassName: "px-4 py-2 border-gray-300 bg-gray-100 border-solid border-b",
9628
9637
  footerToolbar: getObjectFooterToolbar(objectSchema, options.formFactor, {
9638
+ ...options,
9629
9639
  disableStatistics: options.queryCount === false
9630
9640
  }),
9631
9641
  filter: options.filterVisible !== false && await getObjectFilter(objectSchema, fields, options),