kopia lustrzana https://github.com/shoelace-style/shoelace
				
				
				
			rename event
							rodzic
							
								
									4335289d6a
								
							
						
					
					
						commit
						65e90f12f4
					
				|  | @ -206,7 +206,7 @@ export default class SlButton extends ShoelaceElement implements ShoelaceFormCon | |||
| 
 | ||||
|   private handleInvalid(event: Event) { | ||||
|     this.formControlController.setValidity(false); | ||||
|     this.formControlController.emitSlInvalidEvent(event); | ||||
|     this.formControlController.emitInvalidEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   private isButton() { | ||||
|  |  | |||
|  | @ -117,7 +117,7 @@ export default class SlCheckbox extends ShoelaceElement implements ShoelaceFormC | |||
| 
 | ||||
|   private handleInvalid(event: Event) { | ||||
|     this.formControlController.setValidity(false); | ||||
|     this.formControlController.emitSlInvalidEvent(event); | ||||
|     this.formControlController.emitInvalidEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   private handleFocus() { | ||||
|  |  | |||
|  | @ -466,7 +466,7 @@ export default class SlColorPicker extends ShoelaceElement implements ShoelaceFo | |||
| 
 | ||||
|   private handleInputInvalid(event: Event) { | ||||
|     this.formControlController.setValidity(false); | ||||
|     this.formControlController.emitSlInvalidEvent(event); | ||||
|     this.formControlController.emitInvalidEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   private handleTouchMove(event: TouchEvent) { | ||||
|  | @ -771,7 +771,7 @@ export default class SlColorPicker extends ShoelaceElement implements ShoelaceFo | |||
| 
 | ||||
|       if (!this.disabled) { | ||||
|         // By standards we have to emit a `sl-invalid` event here synchronously.
 | ||||
|         this.formControlController.emitSlInvalidEvent(); | ||||
|         this.formControlController.emitInvalidEvent(); | ||||
|       } | ||||
| 
 | ||||
|       return false; | ||||
|  |  | |||
|  | @ -275,7 +275,7 @@ export default class SlInput extends ShoelaceElement implements ShoelaceFormCont | |||
| 
 | ||||
|   private handleInvalid(event: Event) { | ||||
|     this.formControlController.setValidity(false); | ||||
|     this.formControlController.emitSlInvalidEvent(event); | ||||
|     this.formControlController.emitInvalidEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   private handleKeyDown(event: KeyboardEvent) { | ||||
|  |  | |||
|  | @ -223,7 +223,7 @@ export default class SlRadioGroup extends ShoelaceElement implements ShoelaceFor | |||
| 
 | ||||
|   private handleInvalid(event: Event) { | ||||
|     this.formControlController.setValidity(false); | ||||
|     this.formControlController.emitSlInvalidEvent(event); | ||||
|     this.formControlController.emitInvalidEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   private updateCheckedRadio() { | ||||
|  | @ -245,7 +245,7 @@ export default class SlRadioGroup extends ShoelaceElement implements ShoelaceFor | |||
|     const hasCustomValidityMessage = this.customValidityMessage !== ''; | ||||
| 
 | ||||
|     if (isRequiredAndEmpty || hasCustomValidityMessage) { | ||||
|       this.formControlController.emitSlInvalidEvent(); | ||||
|       this.formControlController.emitInvalidEvent(); | ||||
|       return false; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -220,7 +220,7 @@ export default class SlRange extends ShoelaceElement implements ShoelaceFormCont | |||
| 
 | ||||
|   private handleInvalid(event: Event) { | ||||
|     this.formControlController.setValidity(false); | ||||
|     this.formControlController.emitSlInvalidEvent(event); | ||||
|     this.formControlController.emitInvalidEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   /** Sets focus on the range. */ | ||||
|  |  | |||
|  | @ -533,7 +533,7 @@ export default class SlSelect extends ShoelaceElement implements ShoelaceFormCon | |||
| 
 | ||||
|   private handleInvalid(event: Event) { | ||||
|     this.formControlController.setValidity(false); | ||||
|     this.formControlController.emitSlInvalidEvent(event); | ||||
|     this.formControlController.emitInvalidEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   @watch('disabled', { waitUntilFirstUpdate: true }) | ||||
|  |  | |||
|  | @ -102,7 +102,7 @@ export default class SlSwitch extends ShoelaceElement implements ShoelaceFormCon | |||
| 
 | ||||
|   private handleInvalid(event: Event) { | ||||
|     this.formControlController.setValidity(false); | ||||
|     this.formControlController.emitSlInvalidEvent(event); | ||||
|     this.formControlController.emitInvalidEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   private handleClick() { | ||||
|  |  | |||
|  | @ -188,7 +188,7 @@ export default class SlTextarea extends ShoelaceElement implements ShoelaceFormC | |||
| 
 | ||||
|   private handleInvalid(event: Event) { | ||||
|     this.formControlController.setValidity(false); | ||||
|     this.formControlController.emitSlInvalidEvent(event); | ||||
|     this.formControlController.emitInvalidEvent(event); | ||||
|   } | ||||
| 
 | ||||
|   private setTextareaHeight() { | ||||
|  |  | |||
|  | @ -356,7 +356,7 @@ export class FormControlController implements ReactiveController { | |||
|    * If no original `invalid` event has been passed then the `sl-invalid` | ||||
|    * event will be cancelled before being dispatched. | ||||
|    */ | ||||
|   emitSlInvalidEvent(originalInvalidEvent?: Event) { | ||||
|   emitInvalidEvent(originalInvalidEvent?: Event) { | ||||
|     const slInvalidEvent = new CustomEvent<void>('sl-invalid', { | ||||
|       bubbles: false, | ||||
|       composed: false, | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Cory LaViska
						Cory LaViska