testshallpass / react-native-dropdownalert

An alert to notify users about an error or something else
MIT License
1.85k stars 252 forks source link

Alerts unexpectedly autoclosing after update to latest release #202

Closed projectpublius closed 5 years ago

projectpublius commented 5 years ago

Short Description

Similar to #108, updating to the latest version from 3.11.0 results in alerts autoclosing on iOS and Android when closeInterval={0}.

Steps to Reproduce / Code Snippets / Usage

        <DropdownAlert
          closeInterval={0}
          ref={ref => DropDownHolder.setDropDown(ref)}
        />

Expected Results

Alert should stay open until dismissed by user. Downgrading to 3.11.0 fixes the issue.

Additional Information

testshallpass commented 5 years ago

@projectpublius Technically, it is working as expected but definitely is not good if there are use cases for preventing it from automatically closing by setting closeInterval to 0. And so I was able to track it down, apparently, before v4.0.0 there was a condition:if (closeInterval > 1) { that would prevent it from automatic close.

testshallpass commented 5 years ago

@projectpublius Please review PR #203 and 👍 Thanks.