#6911 save on enter #207

Merged
jsegarra merged 50 commits from 6911-saveOnEnter into dev 2024-06-07 07:20:48 +00:00
2 changed files with 26 additions and 0 deletions
Showing only changes of commit 901c8c8f71 - Show all commits

20
src/boot/qformMixin.js Normal file
View File

@ -0,0 +1,20 @@
import { QTable, QForm } from 'quasar';
export default {
inject: { QForm },
component: { QForm },
components: { QForm },
extends: { QForm },
mounted: function () {
if (this.$el?.classList?.contains('q-form'))
if (this.$el?.id !== 'searchbarForm') {
let that = this;
document.addEventListener('keyup', function (evt) {
if (evt.keyCode === 13) {
that.onSubmit();
}
});
}
},
};

6
src/boot/quasar.js Normal file
View File

@ -0,0 +1,6 @@
import { boot } from 'quasar/wrappers';
import qFormMixin from './qformMixin';
export default boot(({ app }) => {
app.mixin(qFormMixin);
});