npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fullcalendar-resource-auto-hide

v1.0.2

Published

Automatically hide resources without events in the visible date range

Readme

FullCalendar Resource Auto-Hide Plugin

Automatically hides resources without events in the visible date range, keeping your resource timeline clean and easy to navigate.

Installation

npm install fullcalendar-resource-auto-hide

Quick Start

import FullCalendar from '@fullcalendar/react';
import resourceTimelinePlugin from '@fullcalendar/resource-timeline';
import resourceAutoHidePlugin from 'fullcalendar-resource-auto-hide';

function App() {
  return (
    <FullCalendar
      plugins={[resourceTimelinePlugin, resourceAutoHidePlugin]}
      initialView="resourceTimelineMonth"
      resources={resources}
      events={events}
      resourceAutoHide={{
        enabled: true
      }}
    />
  );
}

Usage

Vanilla JavaScript

<script src='https://cdn.jsdelivr.net/npm/fullcalendar@6/index.global.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/@fullcalendar/resource-timeline@6/index.global.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/fullcalendar-resource-auto-hide@1/index.global.min.js'></script>
<script>
  const calendarEl = document.getElementById('calendar');
  const calendar = new FullCalendar.Calendar(calendarEl, {
    plugins: ['resourceTimeline', FullCalendarResourceAutoHide.default],
    resourceAutoHide: { enabled: true },
    // ... other options
  });
  calendar.render();
</script>

Configuration Options

<FullCalendar
  plugins={[resourceTimelinePlugin, resourceAutoHidePlugin]}
  initialView="resourceTimelineMonth"
  resources={resources}
  events={events}
  resourceAutoHide={{
    enabled: true,
    bufferDays: 7,
    alwaysVisibleResourceIds: ['unassigned', 'positions-to-fill'],
    debounceMs: 300,
    includeBackgroundEvents: false,
    shouldAlwaysShowResource: (resourceId, resource) => {
      return resource.title?.toLowerCase().includes('priority');
    },
    eventFilter: (event) => {
      return event.extendedProps?.type !== 'hidden';
    }
  }}
/>

Options Reference

| Option | Type | Default | Description | |--------|------|---------|-------------| | enabled | boolean | true | Enable or disable the auto-hide functionality | | bufferDays | number | 0 | Number of days to add as buffer before and after the visible date range | | alwaysVisibleResourceIds | string[] \| function | [] | Resource IDs that should always remain visible | | shouldAlwaysShowResource | function | undefined | Custom function to determine if a resource should always be visible | | debounceMs | number | 300 | Debounce delay in milliseconds for filtering operations | | includeBackgroundEvents | boolean | false | Whether to check background events when determining visibility | | eventFilter | function | undefined | Custom filter function for events to include in visibility calculation |

Examples

Always Show Specific Resources

Keep certain resources visible even when they have no events in the current view:

resourceAutoHide={{
  alwaysVisibleResourceIds: ['unassigned', 'backlog', 'positions-to-fill']
}}

Custom Visibility Rules

Use a function to determine which resources should always be visible:

resourceAutoHide={{
  shouldAlwaysShowResource: (resourceId, resource) => {
    return resource.extendedProps?.department === 'Management';
  }
}}

Filter Event Types

Only consider specific event types when determining visibility:

resourceAutoHide={{
  eventFilter: (event) => {
    return event.extendedProps?.type === 'Booking';
  }
}}

Include Background Events

Count background events when determining resource visibility:

resourceAutoHide={{
  includeBackgroundEvents: true,
  bufferDays: 14
}}

How It Works

The plugin automatically updates resource visibility when you navigate dates or events change:

  1. Monitors datesSet, eventsSet, and eventChange events
  2. Calculates which events overlap with the current visible date range (plus buffer if configured)
  3. Identifies resources associated with those events
  4. Hides resources that have no events in the visible range
  5. Always keeps resources visible if they're specified in alwaysVisibleResourceIds or shouldAlwaysShowResource

Updates are debounced to prevent performance issues during rapid navigation, and resource changes are batched for optimal rendering performance.

Requirements

  • FullCalendar v6.0.0 or higher
  • @fullcalendar/resource-timeline plugin (required)

Browser Support

Supports all browsers that FullCalendar supports: Chrome, Firefox, Safari, and Edge.

License

MIT

Contributing

Contributions are welcome! Open an issue or submit a pull request on GitHub.

Related Links