Allow uiSchema to be set as part of the settings for HomePage
Signed-off-by: ivgo <ivgo@spreadgroup.com>
This commit is contained in:
@@ -173,7 +173,8 @@ Available home page properties that are used for homepage widgets are:
|
||||
To define settings that the users can change for your component, you should define the `layout` and `settings`
|
||||
properties. The `settings.schema` object should follow
|
||||
[react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/docs/) definition and the type of the schema
|
||||
must be `object`.
|
||||
must be `object`. As well, the `uiSchema` can be defined if a certain UI style needs to be applied fo any of the defined
|
||||
properties. More documentation [here](https://rjsf-team.github.io/react-jsonschema-form/docs/api-reference/uiSchema).
|
||||
|
||||
```tsx
|
||||
import { createCardExtension } from '@backstage/plugin-home-react';
|
||||
@@ -201,6 +202,11 @@ export const HomePageRandomJoke = homePlugin.provide(
|
||||
},
|
||||
},
|
||||
},
|
||||
uiSchema: {
|
||||
defaultCategory: {
|
||||
'ui:widget': 'radio', // Instead of the default 'select'
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user