kopia lustrzana https://github.com/shoelace-style/shoelace
				
				
				
			Added `formenctype` to `<sl-button>` (#1009)
* added formenctype to sl-button * updated changelog Co-authored-by: Cory LaViska <cory@abeautifulsite.net>pull/1013/head^2
							rodzic
							
								
									daebd08475
								
							
						
					
					
						commit
						bc6a813c46
					
				|  | @ -35,6 +35,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti | |||
| - Added the `handle-icon` part to `<sl-image-comparer>` | ||||
| - Added `caret`, `check`, `grip-vertical`, `indeterminate`, and `radio` icons to the system library and removed `check-lg` [#985](https://github.com/shoelace-style/shoelace/issues/985) | ||||
| - Added the `loading` attribute to `<sl-avatar>` to allow lazy loading of image avatars [#1006](https://github.com/shoelace-style/shoelace/pull/1006) | ||||
| - Added `formenctype` attribute to `<sl-button>` [#1009](https://github.com/shoelace-style/shoelace/pull/1009) | ||||
| - Added `exports` to `package.json` and removed the `main` and `module` properties [#1007](https://github.com/shoelace-style/shoelace/pull/1007) | ||||
| - Fixed a bug in `<sl-card>` that prevented the border radius to apply correctly to the header [#934](https://github.com/shoelace-style/shoelace/pull/934) | ||||
| - Fixed a bug in `<sl-button-group>` where the inner border disappeared on focus [#980](https://github.com/shoelace-style/shoelace/pull/980) | ||||
|  |  | |||
|  | @ -116,6 +116,10 @@ export default class SlButton extends ShoelaceElement implements ShoelaceFormCon | |||
|   /** Used to override the form owner's `action` attribute. */ | ||||
|   @property({ attribute: 'formaction' }) formAction: string; | ||||
| 
 | ||||
|   /** Used to override the form owner's `enctype` attribute.  */ | ||||
|   @property({ attribute: 'formenctype' }) | ||||
|   formEnctype: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'; | ||||
| 
 | ||||
|   /** Used to override the form owner's `method` attribute.  */ | ||||
|   @property({ attribute: 'formmethod' }) formMethod: 'post' | 'get'; | ||||
| 
 | ||||
|  |  | |||
|  | @ -234,7 +234,7 @@ export class FormSubmitController implements ReactiveController { | |||
| 
 | ||||
|       // Pass form attributes through to the temporary button
 | ||||
|       if (invoker) { | ||||
|         ['formaction', 'formmethod', 'formnovalidate', 'formtarget'].forEach(attr => { | ||||
|         ['formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget'].forEach(attr => { | ||||
|           if (invoker.hasAttribute(attr)) { | ||||
|             button.setAttribute(attr, invoker.getAttribute(attr)!); | ||||
|           } | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Bünyamin Eskiocak
						Bünyamin Eskiocak