Skip to content

Commit 758f165

Browse files
committed
docs(select): update provider select docs
1 parent acbff69 commit 758f165

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: <AvProviderSelect />
3+
---
4+
5+
A select list that automatically loads and pages through providers when the user scrolls down.
6+
7+
### Example
8+
9+
```jsx
10+
import React from 'react';
11+
import { Form } from '@availity/form';
12+
import { AvProviderSelect } from '@availity/select';
13+
import { Button } from 'reactstrap';
14+
import * as yup from 'yup';
15+
import '@availity/yup';
16+
17+
const Example = () => (
18+
<Form
19+
initialValues={{
20+
providers: '',
21+
}}
22+
onSubmit={(values) => apiResource.submit(values)}
23+
validationSchema={yup.object().shape({
24+
providers: yup.string().isRequired('This field is required.'),
25+
})}
26+
>
27+
<AvProviderSelect
28+
id="providers"
29+
name="providers"
30+
parameters={{ atypical: false }}
31+
requiredParams={['customerId']}
32+
watchParams={['customerId']}
33+
/>
34+
<Button color="primary" type="submit">
35+
Submit
36+
</Button>
37+
</Form>
38+
);
39+
```
40+
41+
#### Live example: [Storybook](https://availity.github.io/availity-react/storybook/?path=/story/formik-select-resources--avProviderselect)
42+
43+
### Props
44+
45+
Extends [ResourceSelect Props](/form/select/components/resource-select/#props).
46+
47+
#### `searchAll?: boolean`
48+
49+
The `providers` API from `sdk-js` accepts a role parameter. By default, most applications will only want to return providers who are assigned to the office of the provider's organization, as opposed to the many third-party providers and organizations that they may do business with from time to time as billing or referring providers. If searchAll is true, we will remove this default behavior and return the full list of first and third-party affiliated providers.
50+
51+
#### `parameters: Record<string, unknown>`
52+
53+
This will either be passed directly to the underlying resourceSelect or modified as described above in the searchAll section.

0 commit comments

Comments
 (0)