diff --git a/src/boot/qformMixin.js b/src/boot/qformMixin.js index bcad86745..689157cca 100644 --- a/src/boot/qformMixin.js +++ b/src/boot/qformMixin.js @@ -20,6 +20,12 @@ export default { if (firstInputElement) { firstInputElement.focus(); } + const that = this; + document.addEventListener('keyup', function (evt) { + if (evt.keyCode === 13) { + that.onSubmit(); + } + }); } }, }; diff --git a/src/boot/setDefaults.js b/src/boot/setDefaults.js deleted file mode 100644 index d54baa63e..000000000 --- a/src/boot/setDefaults.js +++ /dev/null @@ -1,41 +0,0 @@ -import { QInput, QSelect } from "quasar"; -import { QTable} from "quasar"; -const setDefault = (component, key, value) => { - const prop = component.props[key]; - switch (typeof prop) { - case "object": - prop.default = value; - break; - case "function": - component.props[key] = { - type: prop, - default: value - }; - break; - case "undefined": - throw new Error("unknown prop: " + key); - default: - throw new Error("unhandled type: " + typeof prop); - } - }; - -QInput.props.outlined = { - type: QInput.props.outlined, - default: true -}; -QInput.props.dense = { - type: QInput.props.dense, - default: true -}; -QInput.props.stackLabel = { - type: QInput.props.stackLabel, - default: true -}; - -setDefault(QInput, "outlined", false); -setDefault(QTable, "gridHeader", true); -setDefault(QTable, "color", 'red-8'); -setDefault(QTable, "pagination", { rowsPerPage: 25 }); -setDefault(QTable, "rowKey", 'id'); -setDefault(QSelect,'optionValue','id'); -setDefault(QSelect,'optionLabel','name'); diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index bca1a0018..96d097191 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -164,11 +164,7 @@ function formatValue(value) {