File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/com/flowingcode/vaadin/addons/carousel Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 2323import com .vaadin .flow .component .ComponentEvent ;
2424import com .vaadin .flow .component .ComponentEventListener ;
2525import com .vaadin .flow .component .DomEvent ;
26+ import com .vaadin .flow .component .EventData ;
2627import com .vaadin .flow .component .HasSize ;
2728import com .vaadin .flow .component .Tag ;
2829import com .vaadin .flow .component .dependency .HtmlImport ;
@@ -181,9 +182,16 @@ public void movePos(int slide) {
181182 // EVENTS
182183 @ DomEvent ("position-changed" )
183184 public static class SlideChangeEvent extends ComponentEvent <Carousel > {
184- public SlideChangeEvent (Carousel source , boolean fromClient ) {
185+ private String position ;
186+
187+ public SlideChangeEvent (
188+ Carousel source , boolean fromClient , @ EventData ("event.detail.value" ) String position ) {
185189 super (source , true );
186190 }
191+
192+ public String getPosition () {
193+ return position ;
194+ }
187195 }
188196
189197 public Registration addChangeListener (ComponentEventListener <SlideChangeEvent > listener ) {
You can’t perform that action at this time.
0 commit comments