GeekyAnts / GeekyAnts/NativeBase
Why does toast.isActive() only take effect when placement is set to bottom
- Dominant language
- TypeScript
- Stars
- 20.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
set placement to top is not usefull
### CodeSandbox/Snack link
no link
### Steps to reproduce

{"bottom": [], "top": [{"component": , "config": [Object], "id": "498416516"}, {"component": , "config": [Object], "id": "498416516"}]}
const isActive = React.useCallback(
(id: any) => {
console.log(toastInfo);
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array = toastInfo[toastPosition];
console.log("positionArray",positionArray) // [],because "bottom": [], so toast.isActive()==>false
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
return false;
},
[toastInfo]
);
### NativeBase Version
3.4.25
### Platform
- [X] Android
- [ ] CRA
- [ ] Expo
- [ ] iOS
- [ ] Next
### Other Platform
_No response_
### Additional Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.