Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
Vanilla Javascript/ Vue: Delete object after checkbox is unchecked

Using vue.js/Vanilla js, I want to put the data being pulled via the checkbox into an "inquiryObj" object and send it to a parent component in an array of "inquiry" objects by emit, but when I uncheck the checkbox it creates an object equals instead of removing from the array of objects.

how am i doing:

    async inquiryPage(estate)
    {
      if (this.inquiry.includes(estate.id))
      {        
        this.inquiry = this.inquiry.filter((item) => item !== estate.id);
        this.inquiry = this.inquiry.filter((item) => item !== 'ikkodate');
        this.inquiry = this.inquiry.filter((item) => item !== estate.estateName);
        this.inquiry = this.inquiry.filter((item) => item !== estate.estatePrice);
      } 
        else
        {          
          this.inquiryObj.push(estate.id);
          this.inquiryObj.push('ikkodate');
          this.inquiryObj.push(estate.estateName);
          this.inquiryObj.push(estate.estatePrice);

          let obj = Object.assign({}, this.inquiryObj);
          this.inquiry.push(obj)
        }    
          await this.$emit("inquiry", this.inquiry)               
    }

the project is running on vue 2.6.11

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!