APIv4 Explorer - Only apply default limit 25 for "get" action
authorColeman Watts <coleman@civicrm.org>
Wed, 23 Jun 2021 06:21:07 +0000 (02:21 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 23 Jun 2021 06:21:07 +0000 (02:21 -0400)
The API Explorer sets a default limit of 25 so you don't get an overwhelming result set
from a `get` action.

However, for other actions like `getFields` or `getActions`, there is no need for
a limit and the default is annoying.

ang/api4Explorer/Explorer.js

index 5cc419a6461dd3709863328c71aee24befccdbd3..f06e9ab353c0d943ccc4e361f6299201cc3c5350 100644 (file)
               default:
                 format = 'raw';
             }
-            if (name === 'limit') {
+            if (name === 'limit' && $scope.action === 'get') {
               defaultVal = 25;
             }
             if (name === 'debug') {