Commit e431917
authored
fix:
## 📜 Description
Don't allow `height` to be `0` when `KeyboardAvoidingView` has
`behavior="height"`.
## 💡 Motivation and Context
The problem is that when we apply `{height: 0}` and then apply `{}`,
then view doesn't reset its styles.
To overcome that problem I decided to avoid cases when we apply
non-positive height (i. e. `<= 0`).
Closes
#949
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### JS
- add `height > 0` condition;
## 🤔 How Has This Been Tested?
Tested in example app.
## 📸 Screenshots (if appropriate):
|Before|After|
|-------|-----|
|<video
src="https://github.com/user-attachments/assets/1af0e90f-8ed3-40d5-a654-62fb860d697b">|<video
src="https://github.com/user-attachments/assets/e2ffce05-0377-4693-99f2-ddba036d55cf">|
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changedKeyboardAvoidingView incorrect layout (#954)1 parent 427374f commit e431917
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | | - | |
| 152 | + | |
152 | 153 | | |
153 | | - | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| |||
0 commit comments