Instawork / hyperview

Server-driven mobile apps with React Native

Home Page:https://hyperview.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request sometimes sent without form data

flochtililoch opened this issue · comments

Repro case in demo app on Android (possibly with iOS too) with example "Case studies > Contacts":

  • enter a couple characters in the search input to trigger a search
  • while search request is pending, delete a character
  • observe requests - one is made without the search field

Further troubleshooting shows that getFormData cannot find the parent form.

A couple theories:

  • the call to getFormData comes from onUpdateFragment, itself coming from onUpdate, it's possible the reference of the element is an orphan, i.e. no document / was part of a document that has since been replaced
  • the element comes from a fragment that was inserted inside a form element, and we don't have the full document reference yet (i.e. the element was selected from a partial Hyperview doc).