react-native-true-sheet/docs
Jovanni Lo 9cc50f5167
feat: emit focus/blur events during present/dismiss (#278)
* feat: emit focus/blur events during present/dismiss

* docs: update focus/blur events documentation

* feat(android): emit focus/blur events during present/dismiss

- Add willFocus/didFocus events with willPresent/didPresent
- Add willBlur/didBlur events with willDismiss/didDismiss
- Use postDelayed with animation duration for did* events after animation
- Handle both programmatic dismiss (STATE_HIDDEN) and user-initiated cancel
- Use isDismissing flag to prevent duplicate events

* refactor(android): extract dismiss event helpers to reduce redundancy

- Add emitWillDismissEvents() helper for willBlur/willDismiss + parent focus
- Add emitDidDismissEvents() helper for didBlur/didDismiss + parent focus + promise
- Update dismiss(), STATE_HIDDEN, and setOnCancelListener to use helpers

* fix(android): emit position change on user-initiated dismiss

onSlide isn't triggered for user-initiated dismiss (back button, tap outside),
so manually emit off-screen position after dismiss animation completes.

* test: add focus/blur event callback tests

* fix: add animated param to mock present/dismiss methods
2025-12-05 01:17:21 +08:00
..
blog fix: make react-native-reanimated truly optional (#271) 2025-12-03 00:01:42 +08:00
docs feat: emit focus/blur events during present/dismiss (#278) 2025-12-05 01:17:21 +08:00
src fix: background improvements (#214) 2025-11-24 17:17:34 +08:00
static docs: update screenshots 2025-11-27 04:33:34 +08:00
.gitattributes chore: fix .gitattributes 2024-05-03 12:24:54 +08:00
.gitignore chore: vercel 2024-04-22 12:40:37 +08:00
babel.config.js Docs (#8) 2024-04-22 00:20:38 +08:00
docusaurus.config.ts docs: add v3.0 release blog and announcement banner 2025-12-01 07:55:01 +08:00
package.json Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
README.md chore: tidy 2024-04-22 12:41:53 +08:00
sidebars.ts Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
tsconfig.json Docs (#8) 2024-04-22 00:20:38 +08:00

Website

This website is built using Docusaurus, a modern static website generator.

Installation

$ yarn

Local Development

$ yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.