Skip to content

Commit

Permalink
docs(select): update provider select docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bjnewman committed Jan 10, 2024
1 parent 5325f64 commit 2045fac
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions docusaurus/docs/form/select/components/provider-select.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: <AvProviderSelect />
---

A select list that automatically loads and pages through providers when the user scrolls down.

### Example

```jsx
import React from 'react';
import { Form } from '@availity/form';
import { AvProviderSelect } from '@availity/select';
import { Button } from 'reactstrap';
import * as yup from 'yup';
import '@availity/yup';

const Example = () => (
<Form
initialValues={{
providers: '',
}}
onSubmit={(values) => apiResource.submit(values)}
validationSchema={yup.object().shape({
providers: yup.string().isRequired('This field is required.'),
})}
>
<AvProviderSelect
id="providers"
name="providers"
parameters={{ atypical: false }}
requiredParams={['customerId']}
watchParams={['customerId']}
/>
<Button color="primary" type="submit">
Submit
</Button>
</Form>
);
```

#### Live example: [Storybook](https://availity.github.io/availity-react/storybook/?path=/story/formik-select-resources--avProviderselect)

### Props

Extends [ResourceSelect Props](/form/select/components/resource-select/#props).

#### `searchAll?: boolean`

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.

#### `parameters: Record<string, unknown>`

This will either be passed directly to the underlying resourceSelect or modified as described above in the searchAll section.

0 comments on commit 2045fac

Please sign in to comment.