Customize Request Condition
Similar to requiredParams, condition can use function to customize the interface request, the function returns true to trigger the request, and returns false to stop the request.
<Container
model={"demo"}
dataProvider={[
{
mode: 'ajax',
namespace: 'EXAMPLE_API',
config: {
url: '/example.com',
method: 'GET'
},
condition: ({$data}) => {
if (/* some condition */) {
return true;
}
return false;
}
}
]}
/>