forked from MapComplete/MapComplete
		
	Fix #1968
This commit is contained in:
		
							parent
							
								
									e7620c2ea0
								
							
						
					
					
						commit
						cecfaebf5b
					
				
					 2 changed files with 12 additions and 3 deletions
				
			
		|  | @ -351,7 +351,7 @@ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         {#if config.freeform?.key && !(config?.mappings?.length > 0)} |         {#if config.freeform?.key && !(config?.mappings?.filter(m => m.hideInAnswer != true)?.length > 0)} | ||||||
|           <!-- There are no options to choose from, simply show the input element: fill out the text field --> |           <!-- There are no options to choose from, simply show the input element: fill out the text field --> | ||||||
|           <FreeformInput |           <FreeformInput | ||||||
|             {config} |             {config} | ||||||
|  | @ -504,7 +504,9 @@ | ||||||
|               <TagHint {state} tags={selectedTags} currentProperties={$tags} /> |               <TagHint {state} tags={selectedTags} currentProperties={$tags} /> | ||||||
|               <span class="flex flex-wrap"> |               <span class="flex flex-wrap"> | ||||||
|                 {#if $featureSwitchIsTesting} |                 {#if $featureSwitchIsTesting} | ||||||
|  |                   <button class="small" on:click={() => console.log("Configuration is ", config)}> | ||||||
|                   Testmode   |                   Testmode   | ||||||
|  |                   </button> | ||||||
|                 {/if} |                 {/if} | ||||||
|                 {#if $featureSwitchIsTesting || $featureSwitchIsDebugging} |                 {#if $featureSwitchIsTesting || $featureSwitchIsDebugging} | ||||||
|                   <span class="subtle">{config.id}</span> |                   <span class="subtle">{config.id}</span> | ||||||
|  |  | ||||||
|  | @ -1,5 +1,7 @@ | ||||||
| <script lang="ts">/** | <script lang="ts">/** | ||||||
|  * Wrapper around 'tagRenderingEditable' but might add mappings dynamically |  * Wrapper around 'tagRenderingEditable' but might add mappings dynamically | ||||||
|  |  * | ||||||
|  |  * Note: does not forward the 'save-button'-slot | ||||||
|  */ |  */ | ||||||
| import TagRenderingConfig, { TagRenderingConfigUtils } from "../../../Models/ThemeConfig/TagRenderingConfig" | import TagRenderingConfig, { TagRenderingConfigUtils } from "../../../Models/ThemeConfig/TagRenderingConfig" | ||||||
| import { UIEventSource } from "../../../Logic/UIEventSource" | import { UIEventSource } from "../../../Logic/UIEventSource" | ||||||
|  | @ -9,6 +11,10 @@ import LayerConfig from "../../../Models/ThemeConfig/LayerConfig" | ||||||
| import TagRenderingQuestion from "./TagRenderingQuestion.svelte" | import TagRenderingQuestion from "./TagRenderingQuestion.svelte" | ||||||
| import type { UploadableTag } from "../../../Logic/Tags/TagUtils" | import type { UploadableTag } from "../../../Logic/Tags/TagUtils" | ||||||
| import { writable } from "svelte/store" | import { writable } from "svelte/store" | ||||||
|  | import Translations from "../../i18n/Translations" | ||||||
|  | import { twJoin } from "tailwind-merge" | ||||||
|  | import Tr from "../../Base/Tr.svelte" | ||||||
|  | import { TrashIcon } from "@rgossiaux/svelte-heroicons/solid" | ||||||
| 
 | 
 | ||||||
| export let config: TagRenderingConfig | export let config: TagRenderingConfig | ||||||
| export let tags: UIEventSource<Record<string, string>> | export let tags: UIEventSource<Record<string, string>> | ||||||
|  | @ -23,7 +29,6 @@ export let allowDeleteOfFreeform: boolean = false | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| let dynamicConfig = TagRenderingConfigUtils.withNameSuggestionIndex(config, tags, selectedElement) | let dynamicConfig = TagRenderingConfigUtils.withNameSuggestionIndex(config, tags, selectedElement) | ||||||
| 
 |  | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <TagRenderingQuestion | <TagRenderingQuestion | ||||||
|  | @ -35,4 +40,6 @@ let dynamicConfig = TagRenderingConfigUtils.withNameSuggestionIndex(config, tags | ||||||
|   {selectedTags} |   {selectedTags} | ||||||
|   {allowDeleteOfFreeform} |   {allowDeleteOfFreeform} | ||||||
|   {extraTags} |   {extraTags} | ||||||
| /> | > | ||||||
|  |   <slot name="cancel" slot="cancel" /> | ||||||
|  | </TagRenderingQuestion> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue