mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Added formenctype to <sl-button> (#1009)
* added formenctype to sl-button * updated changelog Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
This commit is contained in:
committed by
GitHub
parent
daebd08475
commit
bc6a813c46
@@ -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)!);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user