emit does not dispatch vlaue from child to parent component

vue3 with options api

as shown in the below posted code, the child component has a drop-down list as shown in the code in section child. This child component is hosted in parent-1 and parent-2, and parent-1 is hosted in parent-2 as well.
for the attribute isOrdersDropDownListDisabled, when it is set to either of true or false, the drop-down list in the child gets disabled or enabled accordingly, which indicates the binding is done correctly.

But for vModelSelectedGeometryOrder, which represents 2-way binding, it does not work for both of the following scanarios:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>1- when the user selects an item in the list, the log statments in the `computed` property in the child component are executed, but the watched property in `parent-2` which is `vModelSelectedGeometryOrder` does not get executed.
2- since it should be `2-way binding`, when i set the attribute `vModelSelectedGeometryOrder` in the `parent-2` component to any value, i expect that the log statments of the computed property in the child component to be executed and displays the value,
but that does not happen
</code>
<code>1- when the user selects an item in the list, the log statments in the `computed` property in the child component are executed, but the watched property in `parent-2` which is `vModelSelectedGeometryOrder` does not get executed. 2- since it should be `2-way binding`, when i set the attribute `vModelSelectedGeometryOrder` in the `parent-2` component to any value, i expect that the log statments of the computed property in the child component to be executed and displays the value, but that does not happen </code>
1- when the user selects an item in the list, the log statments in the `computed` property in the child component are executed, but the watched property in `parent-2` which is `vModelSelectedGeometryOrder` does not get executed.
2- since it should be `2-way binding`, when i set the attribute `vModelSelectedGeometryOrder` in the `parent-2` component to any value, i expect that the log statments of the computed property in the child component to be executed and displays the value,
but that does not happen

am I emitting compPropsVModelSelectedGeometryOrder wrong? why that is happening please?

child

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code><template>
<div id="idDivGeometriesOrderLabelContainer">
<label id="idLabelGeometriesOrder"> {{ tempTextGeometriesOrder }} </label>
</div>
<div id="idDivDropDownListContainer">
<select name="" id="idGeoTIFFOverlaySettingsDropDownList"
:value="compPropsVModelSelectedGeometryOrder"
@input="$emit('update:compPropsVModelSelectedGeometryOrder', $event.target.value)"
:disabled="isOrdersDropDownListDisabled"
@change="onGeometryOrderSelected($event.target.value)">
<option value="" disabled>orders</option>
<option v-for="featureProps in featuresRecentlyRequestedProcessingProps" :key="featureProps.get('DIGITIZED_FEATURE_PROPERTY_GEOJSON')">{{ featureProps.get('DIGITIZED_FEATURE_PROPERTY_GEOM_ORDER') }}</option>
</select>
</div>
</template>
<script>
import { GeoTIFFOverlaySettingsConstants } from '../../resources/GeoTIFFOverlaySettings/GeoTIFFOverlaySettingsConstants.js';
export default {
name: 'GeoTIFFOverlaySettingsGeomsOrderDropDownList',
data() {
return {
tempTextGeometriesOrder: GeoTIFFOverlaySettingsConstants.CONST_STRING_GEOMETRIES_ORDER_LABEL.description,
};
},
components: {},
props: {
vModelSelectedGeometryOrder: {
// type: String,
default: null,
},
isOrdersDropDownListDisabled: {
type: Boolean,
default: true,
},
featuresRecentlyRequestedProcessingProps: {
type: Object,
default: [],
},
},
emits: {
'update:vModelSelectedGeometryOrder': null,
},
computed: {
compPropsVModelSelectedGeometryOrder: {
get() {
console.log('get.compPropsVModelSelectedGeometryOrder:', this.vModelSelectedGeometryOrder);
return this.vModelSelectedGeometryOrder;
},
set(value) {
console.log('set.compPropsVModelSelectedGeometryOrder:', value);
this.$emit('update:vModelSelectedGeometryOrder', value);
},
},
},
methods: {
onGeometryOrderSelected(evt) {
const msg = JSON.stringify({ msg: verboseTag + 'xcx onGeometryOrderSelected():', evt: evt });
console.log(msg);
this.compPropsVModelSelectedGeometryOrder = evt;
},
},
};
</script>
</code>
<code><template> <div id="idDivGeometriesOrderLabelContainer"> <label id="idLabelGeometriesOrder"> {{ tempTextGeometriesOrder }} </label> </div> <div id="idDivDropDownListContainer"> <select name="" id="idGeoTIFFOverlaySettingsDropDownList" :value="compPropsVModelSelectedGeometryOrder" @input="$emit('update:compPropsVModelSelectedGeometryOrder', $event.target.value)" :disabled="isOrdersDropDownListDisabled" @change="onGeometryOrderSelected($event.target.value)"> <option value="" disabled>orders</option> <option v-for="featureProps in featuresRecentlyRequestedProcessingProps" :key="featureProps.get('DIGITIZED_FEATURE_PROPERTY_GEOJSON')">{{ featureProps.get('DIGITIZED_FEATURE_PROPERTY_GEOM_ORDER') }}</option> </select> </div> </template> <script> import { GeoTIFFOverlaySettingsConstants } from '../../resources/GeoTIFFOverlaySettings/GeoTIFFOverlaySettingsConstants.js'; export default { name: 'GeoTIFFOverlaySettingsGeomsOrderDropDownList', data() { return { tempTextGeometriesOrder: GeoTIFFOverlaySettingsConstants.CONST_STRING_GEOMETRIES_ORDER_LABEL.description, }; }, components: {}, props: { vModelSelectedGeometryOrder: { // type: String, default: null, }, isOrdersDropDownListDisabled: { type: Boolean, default: true, }, featuresRecentlyRequestedProcessingProps: { type: Object, default: [], }, }, emits: { 'update:vModelSelectedGeometryOrder': null, }, computed: { compPropsVModelSelectedGeometryOrder: { get() { console.log('get.compPropsVModelSelectedGeometryOrder:', this.vModelSelectedGeometryOrder); return this.vModelSelectedGeometryOrder; }, set(value) { console.log('set.compPropsVModelSelectedGeometryOrder:', value); this.$emit('update:vModelSelectedGeometryOrder', value); }, }, }, methods: { onGeometryOrderSelected(evt) { const msg = JSON.stringify({ msg: verboseTag + 'xcx onGeometryOrderSelected():', evt: evt }); console.log(msg); this.compPropsVModelSelectedGeometryOrder = evt; }, }, }; </script> </code>
<template>
<div id="idDivGeometriesOrderLabelContainer">
    <label id="idLabelGeometriesOrder"> {{ tempTextGeometriesOrder }} </label>
</div>
<div id="idDivDropDownListContainer">
    <select name="" id="idGeoTIFFOverlaySettingsDropDownList" 
        :value="compPropsVModelSelectedGeometryOrder"
        @input="$emit('update:compPropsVModelSelectedGeometryOrder', $event.target.value)"
        :disabled="isOrdersDropDownListDisabled"
        @change="onGeometryOrderSelected($event.target.value)">
        <option value="" disabled>orders</option>
        <option v-for="featureProps in featuresRecentlyRequestedProcessingProps" :key="featureProps.get('DIGITIZED_FEATURE_PROPERTY_GEOJSON')">{{ featureProps.get('DIGITIZED_FEATURE_PROPERTY_GEOM_ORDER') }}</option>
    </select>
</div>
</template>

<script>
import { GeoTIFFOverlaySettingsConstants } from '../../resources/GeoTIFFOverlaySettings/GeoTIFFOverlaySettingsConstants.js';
export default {
    name: 'GeoTIFFOverlaySettingsGeomsOrderDropDownList',
    data() {
        return {
            tempTextGeometriesOrder: GeoTIFFOverlaySettingsConstants.CONST_STRING_GEOMETRIES_ORDER_LABEL.description,
        };
    },
    components: {},
    props: {
        vModelSelectedGeometryOrder: {
            // type: String,
            default: null,
        },
        isOrdersDropDownListDisabled: {
            type: Boolean,
            default: true,
        },
        featuresRecentlyRequestedProcessingProps: {
            type: Object,
            default: [],
        },
    },
    emits: {
        'update:vModelSelectedGeometryOrder': null,
    },
    computed: {
        compPropsVModelSelectedGeometryOrder: {
            get() {
                console.log('get.compPropsVModelSelectedGeometryOrder:', this.vModelSelectedGeometryOrder);
                return this.vModelSelectedGeometryOrder;
            },
            set(value) {
                console.log('set.compPropsVModelSelectedGeometryOrder:', value);
                this.$emit('update:vModelSelectedGeometryOrder', value);
            },
        },
    },
    methods: {
        onGeometryOrderSelected(evt) {
            const msg = JSON.stringify({ msg: verboseTag + 'xcx onGeometryOrderSelected():', evt: evt });
            console.log(msg);
            this.compPropsVModelSelectedGeometryOrder = evt;
        },
    },
};
</script>

parent-1:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code><GeoTIFFOverlaySettingsGeomsOrderDropDownList
v-model:vModelSelectedGeometryOrder="vModelSelectedGeometryOrder"
v-bind:isOrdersDropDownListDisabled="isOrdersDropDownListDisabled"
v-bind:featuresRecentlyRequestedProcessingProps="featuresRecentlyRequestedProcessingProps"
></GeoTIFFOverlaySettingsGeomsOrderDropDownList>
</code>
<code><GeoTIFFOverlaySettingsGeomsOrderDropDownList v-model:vModelSelectedGeometryOrder="vModelSelectedGeometryOrder" v-bind:isOrdersDropDownListDisabled="isOrdersDropDownListDisabled" v-bind:featuresRecentlyRequestedProcessingProps="featuresRecentlyRequestedProcessingProps" ></GeoTIFFOverlaySettingsGeomsOrderDropDownList> </code>
<GeoTIFFOverlaySettingsGeomsOrderDropDownList
        v-model:vModelSelectedGeometryOrder="vModelSelectedGeometryOrder"
        v-bind:isOrdersDropDownListDisabled="isOrdersDropDownListDisabled"
        v-bind:featuresRecentlyRequestedProcessingProps="featuresRecentlyRequestedProcessingProps"
    ></GeoTIFFOverlaySettingsGeomsOrderDropDownList>
    

parent-2:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code><GeoTIFFOverlaySettingsLayoutContainer
v-bind:isOrdersDropDownListDisabled="isOrdersDropDownListDisabled"
v-bind:featuresRecentlyRequestedProcessingProps="featuresRecentlyRequestedProcessingProps"
v-model:vModelSelectedGeometryOrder="vModelSelectedGeometryOrder"
></GeoTIFFOverlaySettingsLayoutContainer>
...
...
...
watch: {
vModelSelectedGeometryOrder(newVal, oldVal) {
let msg = JSON.stringify({msg: verboseTag + '@watch vModelSelectedGeometryOrder', newVal: newVal, oldVal: oldVal});
console.log(msg);
},
}
</code>
<code><GeoTIFFOverlaySettingsLayoutContainer v-bind:isOrdersDropDownListDisabled="isOrdersDropDownListDisabled" v-bind:featuresRecentlyRequestedProcessingProps="featuresRecentlyRequestedProcessingProps" v-model:vModelSelectedGeometryOrder="vModelSelectedGeometryOrder" ></GeoTIFFOverlaySettingsLayoutContainer> ... ... ... watch: { vModelSelectedGeometryOrder(newVal, oldVal) { let msg = JSON.stringify({msg: verboseTag + '@watch vModelSelectedGeometryOrder', newVal: newVal, oldVal: oldVal}); console.log(msg); }, } </code>
<GeoTIFFOverlaySettingsLayoutContainer
        v-bind:isOrdersDropDownListDisabled="isOrdersDropDownListDisabled"
        v-bind:featuresRecentlyRequestedProcessingProps="featuresRecentlyRequestedProcessingProps"
        v-model:vModelSelectedGeometryOrder="vModelSelectedGeometryOrder"
></GeoTIFFOverlaySettingsLayoutContainer>

...
...
...

watch: {
    vModelSelectedGeometryOrder(newVal, oldVal) {
        let msg = JSON.stringify({msg: verboseTag + '@watch vModelSelectedGeometryOrder', newVal: newVal, oldVal: oldVal});
        console.log(msg);
    },
}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật