forked from verdnatura/salix-front
fix: minor changes
This commit is contained in:
parent
a27ac46f9f
commit
662ffeac0a
|
@ -1,31 +1,11 @@
|
||||||
import { getCurrentInstance } from 'vue';
|
import { getCurrentInstance } from 'vue';
|
||||||
|
|
||||||
const filterAvailableInput = (element) => {
|
|
||||||
return element.classList.contains('q-field__native') && !element.disabled;
|
|
||||||
};
|
|
||||||
// const filterAvailableText = (element) => {
|
|
||||||
// const parentComponent = element.__vueParentComponent;
|
|
||||||
// if (!parentComponent)
|
|
||||||
// return element.attributes.component.nodeValue !== 'input';
|
|
||||||
// return (
|
|
||||||
// parentComponent?.type.name === 'QInput' &&
|
|
||||||
// parentComponent?.attrs?.class !== 'vn-input-date'
|
|
||||||
// );
|
|
||||||
// };
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
const vm = getCurrentInstance();
|
const vm = getCurrentInstance();
|
||||||
if (vm.type.name === 'QForm') {
|
if (vm.type.name === 'QForm') {
|
||||||
if (!['searchbarForm', 'filterPanelForm'].includes(this.$el?.id)) {
|
if (!['searchbarForm', 'filterPanelForm'].includes(this.$el?.id)) {
|
||||||
// TODO: AUTOFOCUS IS NOT FOCUSING
|
// TODO: AUTOFOCUS IS NOT FOCUSING
|
||||||
// const elementsArray = Array.from(this.$el.elements);
|
|
||||||
// const availableInputs = elementsArray.filter(filterAvailableInput);
|
|
||||||
// const firstInputElement = availableInputs.find(filterAvailableText);
|
|
||||||
|
|
||||||
// if (firstInputElement) {
|
|
||||||
// firstInputElement.focus();
|
|
||||||
// }
|
|
||||||
const that = this;
|
const that = this;
|
||||||
this.$el.addEventListener('keyup', function (evt) {
|
this.$el.addEventListener('keyup', function (evt) {
|
||||||
if (evt.key === 'Enter') {
|
if (evt.key === 'Enter') {
|
||||||
|
|
|
@ -22,7 +22,6 @@ const columns = computed(() => [
|
||||||
align: 'right',
|
align: 'right',
|
||||||
label: t('shipped'),
|
label: t('shipped'),
|
||||||
name: 'shipped',
|
name: 'shipped',
|
||||||
cardVisible: false,
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
name: 'fromShipped',
|
name: 'fromShipped',
|
||||||
label: t('fromShipped'),
|
label: t('fromShipped'),
|
||||||
|
@ -47,7 +46,6 @@ const columns = computed(() => [
|
||||||
align: 'right',
|
align: 'right',
|
||||||
label: t('shipped'),
|
label: t('shipped'),
|
||||||
name: 'shipped',
|
name: 'shipped',
|
||||||
cardVisible: false,
|
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
format: ({ shipped }) => toDate(shipped),
|
format: ({ shipped }) => toDate(shipped),
|
||||||
},
|
},
|
||||||
|
@ -55,7 +53,6 @@ const columns = computed(() => [
|
||||||
align: 'right',
|
align: 'right',
|
||||||
label: t('landed'),
|
label: t('landed'),
|
||||||
name: 'landed',
|
name: 'landed',
|
||||||
cardVisible: false,
|
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
format: ({ landed }) => toDate(landed),
|
format: ({ landed }) => toDate(landed),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue