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

250
Views
How to set my state from vuex to it's "original" form?

Is it possible to set the state from my store to its original "form"?

In my application I have modal and when it's closed I want to get rid of all the changes that the user has made.

This is my state:

const state = {
    calendarOptions: [
        { startDate: moment().format("YYYY-MM-DD"), endDate: moment().add(365, 'days').format("YYYY-MM-DD")}
    ],
    startDate: moment().format("YYYY-MM-DD"),
    endDate: moment().add(7, 'days').format("YYYY-MM-DD"),
    dirtyRangeUpdate: true,
    availableChannels: {},
    availableRooms: {},
    availableRates: {}, 
    weekDays: [],
    rangeContext: '',
    selectedRooms: [],
    selectedRatePlans: [],
    selectedChannel: [],
    revenueRatePreference: '',
    showOnlyPreselected: true,
    rangeUpdateDataCollection: null,
    rangeUpdateSubmitData: null
}

How is it possible to achieve it? Thanks in advance.

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!