question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consolidate configuration parameters to avoid duplication

See original GitHub issue

Currently you have to define each config parameters like so:

<FullCalendar
      ref="fullCalendar"
      :selectable="selectable"
      :plugins="plugins"
      :defaultView="defaultView"
      :firstDay="firstDay"
      :nowIndicator="nowIndicator"
      :allDayText="allDayText"
      :slotDuration="slotDuration"
      :slotLabelFormat="slotLabelFormat"
      :slotLabelInterval="slotLabelInterval"
      :locale="locale"
      :height="height"
      :editable="editable"
      :datesAboveResources="datesAboveResources"
      :buttonText="buttonText"
      :header="header"
      :views="views"
      :resources="resources"
      :events="events"
      :resourceRender="resourceRender"
      :columnHeaderHtml="columnHeaderHtml"
      :eventRender="eventRender"
/>

Everything is duplicated and feels wrong:

export default {
  components: {
    Layout,
    FullCalendar,
    TextInput
  },
  data() {
    return {
      plugins: [
        dayGridPlugin,
        timeGridPlugin,
        listPlugin,
        interactionPlugin,
        momentPlugin
      ],
      defaultView: "timeGridWeek",
      firstDay: 1,
      nowIndicator: true,
      allDayText: "Ganztägig",
      slotDuration: "00:15",
      slotLabelFormat: "HH:mm",
      slotLabelInterval: "00:30",
      locale: "de",
      height: "auto",
      editable: true,
      datesAboveResources: true,

      ...

    };
  },
}

Using a simple config parameter like so would be much cleaner:

<FullCalendar
      ref="fullCalendar"
      :config="calendarConfig"
/>
export default {
  data() {
    return {
      calendarConfig: {
         plugins: [
            dayGridPlugin,
            timeGridPlugin,
            listPlugin,
            interactionPlugin,
            momentPlugin
        ],
        defaultView: "timeGridWeek",
        ...
      }
    };
  },
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
dneuschaefer-rubecommented, Oct 24, 2019

Vue allows you to bind objects in order to pass multiple properties at once, so you can already do this like:

<FullCalendar
      ref="fullCalendar"
      v-bind="calendarConfig"
...
/>
1reaction
jackleblackcommented, Nov 26, 2019

I made an easy example from the playground and this not work. Anybody have an idea ?

https://codesandbox.io/s/fullcalendar-vue-1c39z

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve duplicate CIs while implementing ServiceNow ...
Solution: How to resolve CI duplication · i. Select the newer record as the record to be deleted. · ii. Change the name...
Read more >
Remediate a de-duplication task
Remediate a de-duplication task by using the Duplicate CI Remediator wizard. ... to consolidate duplicate CIs according to your configurations and settings.
Read more >
Set up duplicate detection rules to keep your data clean
In the Duplicate Detection Rule Criteria section, in the Base Record Type list, choose the type of record that this rule applies to....
Read more >
How best to avoid asset duplication? (VM & Agent)
Hi Folks, I was hoping to hear how some of you avoid ending up with duplicate assets (cloud agent & ip asset imported...
Read more >
Main vs Duplicate in Consolidate Records
In the Consolidate Record tool determines, based on the available ... The default fields that support singular values keep the value from ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found