mirror of
https://github.com/kamranahmedse/driver.js.git
synced 2026-10-30 19:27:40 +08:00
feat: add 'data' property to DriveStep for custom logic support
Before it was not possible to pass custom data to the `DriveStep` interface. This limits the possiblities within a hook to execute custom logic based on the current step. Fixes #539
This commit is contained in:
committed by
Kamran Ahmed
parent
46371576c0
commit
4d9de02a5d
@@ -258,6 +258,9 @@ type DriveStep = {
|
||||
// Whether to disable interaction with the highlighted element. (default: false)
|
||||
disableActiveInteraction?: boolean;
|
||||
|
||||
// Arbitrary data that you can pass to the step in order to support complex custom logic in hooks.
|
||||
data?: Record<string, any>;
|
||||
|
||||
// Callback when the current step is deselected,
|
||||
// about to be highlighted or highlighted.
|
||||
// Each callback receives the following parameters:
|
||||
|
||||
@@ -20,6 +20,7 @@ export type DriveStep = {
|
||||
onDeselected?: DriverHook;
|
||||
popover?: Popover;
|
||||
disableActiveInteraction?: boolean;
|
||||
data?: Record<string, any>;
|
||||
};
|
||||
|
||||
export interface Driver {
|
||||
|
||||
Reference in New Issue
Block a user