stormseed / daykeep-calendar-quasar

A full event display calendar for the Quasar framework that has multiple viewing formats.
MIT License
270 stars 71 forks source link

Error in nextTick: "RangeError: Maximum call stack size exceeded" using agenda-style="block" #23

Closed arieltoledo closed 6 years ago

arieltoledo commented 6 years ago

Hi @Chris Benjamin, using the following code returns the error shown above

  <template>
  <q-page padding>
    <calendar-agenda
      :eventArray="eventos"
      agenda-style="block"
      :sunday-first-day-of-week="true"
      :allow-editing="false"
      :num-days="1"
      calendar-locale="es"
      calendar-timezone="America/Argentina/Buenos_Aires"
    >
  </calendar-agenda>
  </q-page>
</template>

<script>
import { Calendar } from 'quasar-calendar'
export default {
  data () {
    return {
      eventos: [
        {
          id: 1,
          summary: 'Test event',
          description: 'Some extra info goes here',
          location: 'Inaguración del mural Puto el que lee',
          start: {
            dateTime: '2018-06-12T14:00+02:00', 
            timeZone: 'America/Argentina/Buenos_Aires' 
          },
          end: {
            dateTime: '2018-06-12T16:30+02:00',
            timeZone: 'America/Argentina/Buenos_Aires'
          },
          color: 'primary'
        },
      ]
    }
  },
  components: {
    'calendar-agenda': Calendar
  }
}
</script>

Console shows

found in 
---> <QInfiniteScroll>
       <CalendarAgenda> at node_modules/quasar-calendar/src/components/calendar/CalendarAgenda.vue

When I change the property agenda-style to "dot" works great. Thanks.

arieltoledo commented 6 years ago

Ok, been doing some testing around the component and it fixes when i change the code to

loadMore: function (index, done) {
        this.localNumDays += this.numJumpDays
        done(true)
      }

passing true as parameter for the done function. Found it at https://forum.quasar-framework.org/topic/653/stop-handler-infinite-scroll/7

sirbeagle commented 6 years ago

@arieltoledo Good catch and diagnosis - I was able to reproduce both the problem and the fix on my end. I'll put it in as part of the next update - thanks!

arieltoledo commented 6 years ago

Glad I can help. By the way your component it's a great tool for the q framework. Keep up the good work.