0

Having a problem with seesaw where i'm trying to let the user select the date using combo boxes and then call the function on a button click:

(listen load-data-btn :action (load-data 
   (selection year-cmb) (selection month-cmb) (selection day-cmb)))

This works however, the action loads when the program initially runs so whenever the button is clicked it always contains the first value the combo box is selected. So when I click the button it doesn't look for a new value in (selection year-cmb) it just keeps the one it's already got, the default is set to "".

Any idea how I make it so that every time I click the button call it will get the new value inside the combo box?

broliverparker
  • 217
  • 2
  • 15

1 Answers1

1

my problem was that I hadn't encapsulated the value in an (fn [e]) statement like below

    (listen load-data-btn :action (fn [e] 
(load-data (selection year-cmb) (selection month-cmb) (selection day-cmb))))
broliverparker
  • 217
  • 2
  • 15