FullScheduler - Calendar - Gallery Image

FullScheduler — Changelog v1.0.55 — Predicate updates API

Docs, demos, API

Changelog detail

1.0.55
Back to changelog

Changelog v1.0.55 — Predicate updates API

Date: 2025-10-21
Build: 1.0.55+2350

This release removes the old param-based mutator and introduces a safer, more expressive predicate update API.


❌ Removed

configureEventsByParam

Legacy updater that matched by a single field has been removed. The API encouraged brittle equality checks and was hard to compose.


🆕 Added

updateEvents(predicate, patch)

Functional bulk-updater for events.

    // TypeScript
export type UpdateEvent<T = any> = (
  predicate: (event: FullSchedulerEvent<T>) => boolean,
  patch: Partial<FullSchedulerEvent<T>>
) => FullSchedulerEvent<T>[];

  
  • predicate — receives the entire FullSchedulerEvent<T> and should return true for events to update.

  • **patch** — a partial object (e.g. { start, end, label, data }) merged into each matched event.

  • Returns the new normalized array after updates.

Example: move all ‘Design’ events to tomorrow 10:00–12:00

    const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
const start = new Date(tomorrow.setHours(10, 0, 0, 0));
const end   = new Date(tomorrow.setHours(12, 0, 0, 0));

api.updateEvents(
  (e) => (e.label ?? '').includes('Design'),
  { start, end }
);

  

**Example: tag all events longer than 2h as high‑priority (in data)**

    api.updateEvents(
  (e) => (e.end.getTime() - e.start.getTime()) >= 2 * 60 * 60 * 1000,
  { data: { ...e.data, priority: 'high' } } // if your implementation merges `data` shallowly
);

  

Note: Merging strategy for data is shallow by default. If you maintain deep structures, spread/compose your data in the patch as needed.


🔁 Migration guide (from configureEventsByParam)

Before

    // configureEventsByParam('label', 'Standup', { start: X, end: Y })
api.configureEventsByParam('label', 'Standup', { start: X, end: Y });

  

After

    api.updateEvents(
  (e) => e.label === 'Standup',
  { start: X, end: Y }
);

  

Common patterns:

  • by id moved into data:

    TypeScript
  • multi-field conditions:

    TypeScript

🧩 Notes

  • Works seamlessly with the flattened event storage introduced earlier.

  • Designed to play well with live ghost previews — you can still accept/decline drag/resize without manual patching (callbacks call .accept()).


📌 Meta

  • Scope: public API

  • Breaking changes: Yes (removal of configureEventsByParam)

  • Recommended action: replace usages with updateEvents(...)