You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/reference/react/useDeferredValue.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -517,9 +517,9 @@ input { margin: 10px; }
517
517
518
518
---
519
519
520
-
### Indicating that the content is stale {/*indicating-that-the-content-is-stale*/}
520
+
### Подсветка неактуальных данных {/*indicating-that-the-content-is-stale*/}
521
521
522
-
In the example above, there is no indication that the result list for the latest query is still loading. This can be confusing to the user if the new results take a while to load. To make it more obvious to the user that the result list does not match the latest query, you can add a visual indication when the stale result list is displayed:
522
+
В предыдущем примере в списке последних результатов никак не обозначалось, что результаты по новому запросу всё ещё загружаются. Такой интерфейс может сбить с толку, особенно если новые результаты будут загружаться долго. Решить проблему можно, добавив визуальную индикацию для случая, когда отображаемый список результатов больше не актуален и не соответствует последнему запросу:
523
523
524
524
```js {2}
525
525
<div style={{
@@ -529,7 +529,7 @@ In the example above, there is no indication that the result list for the latest
529
529
</div>
530
530
```
531
531
532
-
With this change, as soon as you start typing, the stale result list gets slightly dimmed until the new result list loads. You can also add a CSS transition to delay dimming so that it feels gradual, like in the example below:
532
+
Благодаря этим изменениям, когда вы начнёте набирать новый запрос, список старых результатов потускнеет, пока не загрузится новый список. Вы даже можете добавить анимированный переход с задержкой, чтобы визуально "устаревание" ощущалось постепенным. Например:
533
533
534
534
<Sandpack>
535
535
@@ -559,10 +559,10 @@ export default function App() {
0 commit comments