Skip to content

Commit b989828

Browse files
author
Bob Strahan
committed
Fix #134 - Doc class dropdown shows no options when editing sections
1 parent d1c32d0 commit b989828

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ SPDX-License-Identifier: MIT-0
1616
- Evaluation Configuration Robustness
1717
- Improved JSON Schema error messages with actionable diagnostics when configuration issues occur
1818
- Added automatic type coercion for numeric constraints (e.g., `maxItems: "7"``maxItems: 7`) to handle common YAML parsing quirks gracefully
19+
- Fix #134 - Doc class dropdown shows no options when editing sections
1920
- Fix #133 - Cast topK to int to defend against transient ValidationException exceptions
2021
- Fix #132 - TRACKING_TABLE environment variable needed in EvaluationFunction
2122
- Fix #131 - HITL functions broken post docker migration

src/ui/src/components/sections-panel/SectionsPanel.jsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -275,17 +275,19 @@ const SectionsPanel = ({ sections, pages, documentItem, mergedConfig, onSaveChan
275275
// Get available classes from configuration
276276
const getAvailableClasses = () => {
277277
if (!configuration?.classes) return [];
278-
return configuration.classes.map((cls) => {
279-
// Support both JSON Schema and legacy formats
280-
// JSON Schema: $id or x-aws-idp-document-type
281-
// Legacy: name
282-
const className = cls.$id || cls['x-aws-idp-document-type'] || cls.name;
283-
284-
return {
285-
label: className,
286-
value: className,
287-
};
288-
}).filter(option => option.value); // Remove any undefined entries
278+
return configuration.classes
279+
.map((cls) => {
280+
// Support both JSON Schema and legacy formats
281+
// JSON Schema: $id or x-aws-idp-document-type
282+
// Legacy: name
283+
const className = cls.$id || cls['x-aws-idp-document-type'] || cls.name;
284+
285+
return {
286+
label: className,
287+
value: className,
288+
};
289+
})
290+
.filter((option) => option.value); // Remove any undefined entries
289291
};
290292

291293
// Generate next sequential section ID

0 commit comments

Comments
 (0)