Updating a repeater row

Hello -

I’m trying to update a row in a repeater. Basically, you select the first box and click on ‘Make’. At this point I’m changing the ‘type’ in the repeater. Shouldn’t the repeater update? If I type ‘1’ in the type column for the repeater it updates without issue. What am I missing?test.rp (62.6 KB)

Your fieldSelect1 widget (the first box) has two events:

  • Got Focus – Show fieldSelect bring to front
  • Lost Focus – Hide fieldSelect

This would seem to make sense, however when you click anywhere outside of fieldSelect1, it loses focus and hides fieldSelect. This happens before the Click event of your hotspot in the fieldSelect panel, so that action never gets fired or handled. (I discovered this by viewing the Console in the browser Preview and clicking “Start Trace”. This will show every event that your prototype recognizes. In this case, only Got Focus and Lost Focus fired, and Click or Tap (on your hotspot) never shows.)

I deleted the Lost Focus event and it worked: The row got updated, the text of fieldSelect1 changed to “Make” and the droplist hid. That’s the quick fix, but I’m sure you’d like to retain the ability to hide the droplist if user clicks outside of it. You could add a Hide action to your other widgets, and even create a big hotspot in the background with a Hide action, but it occurred to me it would be nice if the Lost Focus event still worked unless the user was actively doing something with the droplist. Looking at the possible conditional cases led to an Aha! moment: test if the cursor is not over the droplist, and only then hide the droplist when fieldSelect1 loses focus. Voila! See Page 2 of this updated file:

test-update-repeater.rp (87.9 KB)

Thanks for figuring it out!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.