Skip to content

Commit 1f4456f

Browse files
committed
Extend stepper example
1 parent bc0a4ec commit 1f4456f

File tree

5 files changed

+26
-1
lines changed

5 files changed

+26
-1
lines changed

Diff for: user-interface/src/main/bundles/prod.bundle

889 KB
Binary file not shown.

Diff for: user-interface/src/main/java/life/qbic/datamanager/views/demo/ComponentDemo.java

+14
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,20 @@ private static Div stepperDialogShowCase(List<Step> steps, String dialogTitle) {
134134
content.add(title);
135135
content.add(showDialog);
136136
content.addClassNames("flex-vertical", "gap-04");
137+
138+
Div confirmBox = new Div("Click the button and press 'Cancel' or 'Save'");
139+
dialog.registerConfirmAction(() -> {
140+
confirmBox.setText("Stepper dialog has been confirmed");
141+
dialog.close();
142+
});
143+
144+
dialog.registerCancelAction(() -> {
145+
confirmBox.setText("Stepper dialog has been cancelled");
146+
dialog.close();
147+
});
148+
149+
content.add(confirmBox);
150+
137151
return content;
138152
}
139153

Diff for: user-interface/src/main/java/life/qbic/datamanager/views/general/dialog/stepper/StepperDialog.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class StepperDialog {
2020

2121
private final AppDialog dialog;
2222
private final List<Step> steps;
23-
private List<NavigationListener> navigationListeners;
23+
private final List<NavigationListener> navigationListeners;
2424
private final int numberOfSteps;
2525
private int currentStep;
2626

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Support for editing Flow views with Copilot
2+
com.vaadin.experimental.copilotFlow=true

Diff for: user-interface/vite.config.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { UserConfigFn } from 'vite';
2+
import { overrideVaadinConfig } from './vite.generated';
3+
4+
const customConfig: UserConfigFn = (env) => ({
5+
// Here you can add custom Vite parameters
6+
// https://vitejs.dev/config/
7+
});
8+
9+
export default overrideVaadinConfig(customConfig);

0 commit comments

Comments
 (0)