forked from MapComplete/MapComplete
		
	Lint: use event forwarding
This commit is contained in:
		
							parent
							
								
									0d25a7fa7b
								
							
						
					
					
						commit
						f1381176ba
					
				
					 1 changed files with 6 additions and 7 deletions
				
			
		| 
						 | 
					@ -25,8 +25,8 @@
 | 
				
			||||||
    inline = config.freeform?.inline
 | 
					    inline = config.freeform?.inline
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const dispatch = createEventDispatcher<{selected}>()
 | 
				
			||||||
  export let feedback: UIEventSource<Translation> 
 | 
					  export let feedback: UIEventSource<Translation> 
 | 
				
			||||||
  let dispatch = createEventDispatcher<{ selected, submit }>()
 | 
					 | 
				
			||||||
  onDestroy(
 | 
					  onDestroy(
 | 
				
			||||||
    value.addCallbackD(() => {
 | 
					    value.addCallbackD(() => {
 | 
				
			||||||
      dispatch("selected")
 | 
					      dispatch("selected")
 | 
				
			||||||
| 
						 | 
					@ -45,9 +45,8 @@
 | 
				
			||||||
        {feedback}
 | 
					        {feedback}
 | 
				
			||||||
        {getCountry}
 | 
					        {getCountry}
 | 
				
			||||||
        {unit}
 | 
					        {unit}
 | 
				
			||||||
        on:selected={() => dispatch("selected")}
 | 
					        on:selected
 | 
				
			||||||
        on:submit={() => dispatch("submit")}
 | 
					        on:submit
 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        type={config.freeform.type}
 | 
					        type={config.freeform.type}
 | 
				
			||||||
        {placeholder}
 | 
					        {placeholder}
 | 
				
			||||||
        {value}
 | 
					        {value}
 | 
				
			||||||
| 
						 | 
					@ -58,13 +57,13 @@
 | 
				
			||||||
      {feedback}
 | 
					      {feedback}
 | 
				
			||||||
      {getCountry}
 | 
					      {getCountry}
 | 
				
			||||||
      {unit}
 | 
					      {unit}
 | 
				
			||||||
      on:selected={() => dispatch("selected")}
 | 
					      on:selected
 | 
				
			||||||
      on:submit={() => dispatch("submit")}
 | 
					      on:submit
 | 
				
			||||||
      type={config.freeform.type}
 | 
					      type={config.freeform.type}
 | 
				
			||||||
      {placeholder}
 | 
					      {placeholder}
 | 
				
			||||||
      {value}
 | 
					      {value}
 | 
				
			||||||
    />
 | 
					    />
 | 
				
			||||||
  {/if}
 | 
					  {/if}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <InputHelper args={config.freeform.helperArgs} {feature} type={config.freeform.type} {value} on:submit={() => dispatch("submit")} />
 | 
					  <InputHelper args={config.freeform.helperArgs} {feature} type={config.freeform.type} {value} on:submit />
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue