File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @stoplight/json-schema-viewer" ,
3- "version" : " 4.16.401 " ,
3+ "version" : " 4.16.402 " ,
44 "description" : " A beautiful React component for viewing JSON Schema" ,
55 "keywords" : [],
66 "sideEffects" : false ,
Original file line number Diff line number Diff line change @@ -861,6 +861,7 @@ exports[`HTML Output > given anyOf combiner placed next to allOf > given allOf m
861861 >
862862 <div
863863 class = " sl-flex sl-items-center sl-max-w-full"
864+ data-required = " true"
864865 >
865866 <div
866867 class = " sl-flex sl-items-baseline sl-text-base"
@@ -1381,6 +1382,7 @@ exports[`HTML Output > given oneOf combiner placed next to allOf > given allOf m
13811382 >
13821383 <div
13831384 class = " sl-flex sl-items-center sl-max-w-full"
1385+ data-required = " true"
13841386 >
13851387 <div
13861388 class = " sl-flex sl-items-baseline sl-text-base"
Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ export const SchemaRow: React.FunctionComponent<SchemaRowProps> = React.memo(
117117 maxW = "full"
118118 onClick = { isCollapsible ? ( ) => setExpanded ( ! isExpanded ) : undefined }
119119 cursor = { isCollapsible ? 'pointer' : undefined }
120+ // The Flex component extends Box.
121+ // node_modules/@stoplight /mosaic/components/Box/types.d.ts line 5 defines that all data-xxx attributes must be of type string.
122+ // export declare type DatasetProps = Record<`data-${string}`, string>;
123+ // --> we can't use the boolean 'required' directly
124+ data-required = { required ? 'true' : undefined }
120125 >
121126 { isCollapsible ? < Caret isExpanded = { isExpanded } /> : null }
122127 < Flex alignItems = "baseline" fontSize = "base" >
You can’t perform that action at this time.
0 commit comments