Within my form created with the Element UI, I have implemented an autocomplete feature. However, I am facing an issue where duplicate entries are being added to the table even if they already exist. My goal is to prevent the addition of duplicate entries and instead highlight the existing row when the same item_name is selected by checking the upc_ean_isbn, which serves as the unique key.
https://i.sstatic.net/Twf0J.png
Below is the code snippet:
<template>
<!-- Code goes here -->
</template>
<script>
export default {
// Your data and methods
};
</script>
If you want to view a working example, check out my jsfiddle here.
Thank you.