fix: emit events across the app (#10227)

This PR makes the following changes

1. Update v-model bindings for components using the old `value` prop and `input` event method
2. Remove components that were not used anywhere

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Shivam Mishra
2024-10-04 20:33:41 +05:30
committed by GitHub
parent 88a16b8e96
commit 9338bc1391
13 changed files with 44 additions and 354 deletions

View File

@@ -1,9 +1,10 @@
<script>
export default {
// The value types are dynamic, hence prop validation removed to work with our action schema
// eslint-disable-next-line vue/require-prop-types
props: ['teams', 'value'],
emits: ['input'],
props: {
teams: { type: Array, required: true },
modelValue: { type: Object, required: true },
},
emits: ['update:modelValue'],
data() {
return {
selectedTeams: [],
@@ -11,13 +12,13 @@ export default {
};
},
mounted() {
const { team_ids: teamIds } = this.value;
const { team_ids: teamIds } = this.modelValue;
this.selectedTeams = teamIds;
this.message = this.value.message;
this.message = this.modelValue.message;
},
methods: {
updateValue() {
this.$emit('input', {
this.$emit('update:modelValue', {
team_ids: this.selectedTeams.map(team => team.id),
message: this.message,
});