Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/tour-group-interface/src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export default {
buttonIcon: 'subscriptions',
buttonTooltip: 'Start the tour',
exitMessage: 'Are you sure you want to leave the tour?',
rootSelector: 'main > .v-form',
};
11 changes: 11 additions & 0 deletions packages/tour-group-interface/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,17 @@ export default defineInterface({
default_value: null,
},
},
{
field: 'rootSelector',
name: 'Root selector',
type: 'string',
meta: {
width: 'full',
},
schema: {
default_value: defaults.rootSelector,
},
},
],
};

Expand Down
4 changes: 3 additions & 1 deletion packages/tour-group-interface/src/interface.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const props = withDefaults(
buttonIcon: string;
buttonTooltip: string;
exitMessage: string;
rootSelector: string;
}>(),
{
batchActiveFields: () => [],
Expand All @@ -38,6 +39,7 @@ const props = withDefaults(
buttonIcon: defaults.buttonIcon,
buttonTooltip: defaults.buttonTooltip,
exitMessage: defaults.exitMessage,
rootSelector: defaults.rootSelector,
},
);

Expand Down Expand Up @@ -113,7 +115,7 @@ function useInjectButtonBar() {
}

function getRootForm() {
return document.querySelector('main>.v-form');
return document.querySelector(props.rootSelector);
}

function injectButtonBar() {
Expand Down