Instawork / hyperview

Server-driven mobile apps with React Native
https://hyperview.org
MIT License
1.25k stars 64 forks source link

action="replace" doesn't take effect in some special cases #216

Open terryatgithub opened 3 years ago

terryatgithub commented 3 years ago

action="replace" doesn't take effect in some special case so far I found:

  1. in Official Demo: Behaviors -> Indicators -> Inline Indicator (source file in hyperview/examples/behaviors/inline_button_indicator.xml) issue is :
    when press the button 'Press me', after delay, the content of view which id="container" would not be replaced. I checked above issue by expo client app installed in emulator iPhone11(ios 14.3) and Android device(Android 10), both not work. for reference: it can work if remove the both attribute: 'show-during-load' and 'hide-during-load'

  2. in real project as below code,

    • in option 1: the loading effect will work, but replace action would NOT work;
    • in option 2: the loading effect and replace aciton would work both; the mere diffrence between two options is put spinner tag out of option tag scope, as you can find below:
   `<view>
          <text>select choice:</text>
          <select-single name="choice">
              <option value="1" trigger="select" action="replace"  delay="300" show-during-load="ID_Spinner1" target="modal-uninterested" href="/behaviors/_target_sibling_fragment.xml" >
                  <text>option 1</text>
                  <spinner id="ID_Spinner1" color="red" hide="true" />
              </option>
              <option value="2" trigger="select" action="replace" delay="300" show-during-load="ID_Spinner2"  target="modal-uninterested" href="/behaviors/_target_sibling_fragment.xml" >
                  <text>option 2</text>
              </option>
              <spinner id="ID_Spinner2" color="red" hide="true" />
          </select-single>
      </view>
`

I checked above issue in real project on Android device(Android 10);

please help check, feel free if need any more information, thanks a lot.

terryatgithub commented 3 years ago

in case 2, the effect I want to realize is put spinner just after text in option tag, not outside of it.