forked from MapComplete/MapComplete
		
	Studio: show correct question if available, see #1929
This commit is contained in:
		
							parent
							
								
									70bb4bb006
								
							
						
					
					
						commit
						204027b4e9
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -31,10 +31,9 @@
 | 
				
			||||||
    schema.description = undefined
 | 
					    schema.description = undefined
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const subparts: ConfigMeta = state
 | 
					  const subparts: ConfigMeta[] = state
 | 
				
			||||||
    .getSchemaStartingWith(schema.path)
 | 
					    .getSchemaStartingWith(schema.path)
 | 
				
			||||||
    .filter((part) => part.path.length - 1 === schema.path.length)
 | 
					    .filter((part) => part.path.length - 1 === schema.path.length)
 | 
				
			||||||
 | 
					 | 
				
			||||||
  let messages = state.messagesFor(path)
 | 
					  let messages = state.messagesFor(path)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const currentValue: UIEventSource<any[]> = state.getStoreFor(path)
 | 
					  const currentValue: UIEventSource<any[]> = state.getStoreFor(path)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,6 +9,7 @@
 | 
				
			||||||
  import SchemaBasedInput from "./SchemaBasedInput.svelte"
 | 
					  import SchemaBasedInput from "./SchemaBasedInput.svelte"
 | 
				
			||||||
  import type { JsonSchemaType } from "./jsonSchema"
 | 
					  import type { JsonSchemaType } from "./jsonSchema"
 | 
				
			||||||
  import ShowConversionMessage from "./ShowConversionMessage.svelte"
 | 
					  import ShowConversionMessage from "./ShowConversionMessage.svelte"
 | 
				
			||||||
 | 
					  import type { Translatable } from "../../Models/ThemeConfig/Json/Translatable"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * If 'types' is defined: allow the user to pick one of the types to input.
 | 
					   * If 'types' is defined: allow the user to pick one of the types to input.
 | 
				
			||||||
| 
						 | 
					@ -41,7 +42,7 @@
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  const configJson: QuestionableTagRenderingConfigJson  & {questionHintIsMd: boolean}= {
 | 
					  const configJson: QuestionableTagRenderingConfigJson  & {questionHintIsMd: boolean}= {
 | 
				
			||||||
    id: "TYPE_OF:" + path.join("_"),
 | 
					    id: "TYPE_OF:" + path.join("_"),
 | 
				
			||||||
    question: "Which subcategory is needed for " + schema.path.at(-1) + "?",
 | 
					    question: schema.hints.question ?? "Which subcategory is needed for " + schema.path.at(-1) + "?",
 | 
				
			||||||
    questionHint: schema.description,
 | 
					    questionHint: schema.description,
 | 
				
			||||||
    questionHintIsMd: true,
 | 
					    questionHintIsMd: true,
 | 
				
			||||||
    mappings: types
 | 
					    mappings: types
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue