Skip to content

Commit a565dac

Browse files
merging all conflicts
2 parents 9284e66 + f0a9793 commit a565dac

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

content/docs/accessibility.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ class Parent extends React.Component {
227227
this.inputElement.current.focus();
228228
```
229229

230+
<<<<<<< HEAD
230231
Khi sử dụng HOC để mở rộng components, [chuyển tiếp ref](/docs/forwarding-refs.html) được khuyên dùng để bao bọc component sử dụng `forwardRef` function của React. Nếu một third party HOC không implement ref forwarding, pattern bên trên vẫn có thể sử dụng như một fallback.
232+
=======
233+
When using a [HOC](/docs/higher-order-components.html) to extend components, it is recommended to [forward the ref](/docs/forwarding-refs.html) to the wrapped component using the `forwardRef` function of React. If a third party HOC does not implement ref forwarding, the above pattern can still be used as a fallback.
234+
>>>>>>> f0a9793dff9f8e86ec365bfadb0b4b23c6f618ce
231235
232236
Một ví dụ về cách quản lý focus tốt là [react-aria-modal](https://github.com/davidtheclark/react-aria-modal). Đây là một ví dụ tương đối hiếm hoi nói về một cửa sổ modal có thể truy cập hoàn toàn. Nó không chỉ set focus ban đầu vào nút cancel (ngăn chặn người dùng không vô tình dùng bàn phím kích hoạt success action) và khóa focus từ bàn phím vào bên trong modal, nó cũng reset focus về lại element đã kích hoạt modal đó lúc ban đầu.
233237

content/docs/forms.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,11 @@ Ngoài ra, kể từ khi `setState()` tự động [gộp các phần của stat
271271

272272
## Controlled Input với giá trị null {#controlled-input-null-value}
273273

274+
<<<<<<< HEAD
274275
Cũng có ngoại lệ, giá trị của prop trong một [controlled component](/docs/forms.html#controlled-components) sẽ ngăn người dùng thay đổi nó trừ khi bạn cũng muốn vậy. Nếu bạn đã cung cấp một `value` nhưng thẻ input vẫn có khả năm bị sửa đổi, bạn đã vô tình gán `value` bằng với `undefined` hay `null`.
276+
=======
277+
Specifying the `value` prop on a [controlled component](/docs/forms.html#controlled-components) prevents the user from changing the input unless you desire so. If you've specified a `value` but the input is still editable, you may have accidentally set `value` to `undefined` or `null`.
278+
>>>>>>> f0a9793dff9f8e86ec365bfadb0b4b23c6f618ce
275279
276280
Đoạn code bên dưới sẽ làm rõ điều ta vừa đề cập. (Thẻ input đã được gán giá trị lúc bạn đầu nhưng trở nên có thể bị sửa đổi sau một khoảng thời gian chờ.)
277281

0 commit comments

Comments
 (0)