Merge pull request #22478 from autodesk-forks/nikolarAutodesk/entity-feedback_defaultResponse

[plugin/feedback-entity] Improvements to Feedback Plugin UI
This commit is contained in:
Fredrik Adelöw
2024-03-01 13:25:36 +01:00
committed by GitHub
7 changed files with 22 additions and 7 deletions
@@ -108,7 +108,7 @@ export const FeedbackResponseDialog = (props: FeedbackResponseDialogProps) => {
<DialogTitle>{feedbackDialogTitle}</DialogTitle>
<DialogContent>
<FormControl component="fieldset">
<FormLabel component="legend">Choose all that applies</FormLabel>
<FormLabel component="legend">Choose all that apply</FormLabel>
<FormGroup>
{feedbackDialogResponses.map(response => (
<FormControlLabel
@@ -80,9 +80,13 @@ export const FeedbackResponseTable = (props: FeedbackResponseTableProps) => {
width: '35%',
render: (response: ResponseRow) => (
<>
{response.response?.split(',').map(res => (
<Chip key={res} size="small" label={res} />
))}
{(response.response || '')
.split(',')
.map(v => v.trim()) // removes whitespace
.filter(Boolean) // removes accidental empty entries
.map(res => (
<Chip key={res} size="small" label={res} />
))}
</>
),
},