Change ui:options to ui:backstage
Signed-off-by: chicoribas <chico.bribas@gmail.com>
This commit is contained in:
@@ -231,7 +231,7 @@ spec:
|
||||
|
||||
Sometimes, specially in custom fields, you collect some data on Create form that
|
||||
must note be shown to the user on Review step. To hide or mask this data, you
|
||||
can set some properties of `ui:options`:
|
||||
can use `ui:widget: password` or set some properties of `ui:backstage`:
|
||||
|
||||
```yaml
|
||||
- title: Hide or mask values
|
||||
@@ -243,13 +243,13 @@ can set some properties of `ui:options`:
|
||||
masked:
|
||||
title: Masked
|
||||
type: string
|
||||
ui:options:
|
||||
ui:backstage:
|
||||
review:
|
||||
mask: '<some-value-to-show>' # will print '<some-value-to-show>' as value for property 'Masked' on Review Step
|
||||
hidden:
|
||||
title: Hidden
|
||||
type: string
|
||||
ui:options:
|
||||
ui:backstage:
|
||||
review:
|
||||
show: false # wont print any info about 'hidden' property on Review Step
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('MultistepJsonForm', () => {
|
||||
masked: {
|
||||
title: 'Masked',
|
||||
type: 'string',
|
||||
'ui:options': {
|
||||
'ui:backstage': {
|
||||
review: {
|
||||
show: true,
|
||||
mask: '******',
|
||||
@@ -61,7 +61,7 @@ describe('MultistepJsonForm', () => {
|
||||
hidden: {
|
||||
title: 'Hidden',
|
||||
type: 'string',
|
||||
'ui:options': {
|
||||
'ui:backstage': {
|
||||
review: {
|
||||
show: false,
|
||||
},
|
||||
|
||||
@@ -63,7 +63,6 @@ export function getUiSchemasFromSteps(steps: Step[]): UiSchema[] {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return uiSchemas;
|
||||
}
|
||||
|
||||
@@ -84,12 +83,12 @@ export function getReviewData(formData: Record<string, any>, steps: Step[]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!uiSchema['ui:options'] || !uiSchema['ui:options'].review) {
|
||||
if (!uiSchema['ui:backstage'] || !uiSchema['ui:backstage'].review) {
|
||||
reviewData[key] = formData[key];
|
||||
continue;
|
||||
}
|
||||
|
||||
const review = uiSchema['ui:options'].review as JsonObject;
|
||||
const review = uiSchema['ui:backstage'].review as JsonObject;
|
||||
if (!review.show) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user