@@ -296,7 +296,17 @@ var _FormBase = function (_Vue) {
296296
297297 function _FormBase ( ) {
298298 classCallCheck ( this , _FormBase ) ;
299- return possibleConstructorReturn ( this , ( _FormBase . __proto__ || Object . getPrototypeOf ( _FormBase ) ) . apply ( this , arguments ) ) ;
299+
300+ /**
301+ * Adds keyboard shortcut for enter key to submit form
302+ *
303+ * @default true
304+ * @type {boolean }
305+ */
306+ var _this = possibleConstructorReturn ( this , ( _FormBase . __proto__ || Object . getPrototypeOf ( _FormBase ) ) . apply ( this , arguments ) ) ;
307+
308+ _this . keyboardShortcuts = true ;
309+ return _this ;
300310 }
301311
302312 return _FormBase ;
@@ -309,6 +319,9 @@ __decorate([vueTyped.Prop({
309319__decorate ( [ vueTyped . Prop ( {
310320 type : String
311321} ) ] , _FormBase . prototype , "labelWidth" , void 0 ) ;
322+ __decorate ( [ vueTyped . Prop ( {
323+ type : Boolean
324+ } ) ] , _FormBase . prototype , "keyboardShortcuts" , void 0 ) ;
312325
313326var Form = function ( _FormBase2 ) {
314327 inherits ( Form , _FormBase2 ) ;
@@ -328,7 +341,9 @@ var Form = function (_FormBase2) {
328341 } ,
329342 onFailure : function onFailure ( formErrors , fields ) {
330343 self . $emit ( 'error' , formErrors , fields ) ;
331- }
344+ } ,
345+ // using default form keyboard shortcuts instead
346+ keyboardShortcuts : false
332347 } ;
333348 if ( this . validator ) {
334349 Object . assign ( opt , {
@@ -353,7 +368,8 @@ var Form = function (_FormBase2) {
353368 } , {
354369 key : 'render' ,
355370 value : function render ( ch ) {
356- return ch ( 'form' , {
371+ var tag = this . keyboardShortcuts ? 'form' : 'div' ;
372+ return ch ( tag , {
357373 class : 'ui form' ,
358374 domProps : {
359375 onsubmit : function onsubmit ( e ) {
0 commit comments