Files
backstage/plugins/org-react
Fredrik Adelöw cb716004ef add some eslint rules for testing-library use in tests
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2022-11-18 11:29:20 +01:00
..
2022-10-20 10:21:17 +02:00
2022-11-15 12:31:55 +00:00
2022-11-15 12:31:55 +00:00
2022-10-25 01:29:46 +02:00

org-react

features

  • Group list picker component

GroupListPicker

The GroupListPicker component displays a select box which also has autocomplete functionality.

To use the GroupListPicker component you'll need to import it and add it to your desired place.

+ import { GroupListPicker } from '@backstage/plugin-org-react';
+ import React, { useState } from 'react';

+ const [group, setGroup] = useState<GroupEntity | undefined>();

 <Grid container spacing={3}>
    <Grid item xs={12}>
+     <GroupListPicker groupTypes={['team']} placeholder='Search for a team' onChange={setGroup}/>
    </Grid>
 </Grid>

The GroupListPicker comes with three props:

  • groupTypes: gives the user the option which group types the component should load. If no value is provided all group types will be loaded in;
  • placeholder: the placeholder that the select box in the component should display. This might be helpful in informing your users what the functionality of the component is.
  • onChange: a prop to help the user to give access to the selected group