Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Bug - LogViewer - Doesn't maintain scroll position when wrap text prop changes

Offen
#6 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
typescript
Bereich
frontend

Rechercherichtung

Start with the LogViewer implementation and reproduce the issue in the PatternFly demo at the linked complex-toolbar URL: scroll to a later line, then toggle Wrap Text. Trace the rerender and confirm that the fix preserves the same log location after wrapping changes, then verify the reproduction no longer returns to line 1.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

Describe the problem
A clear and concise description of the problem. Which components are affected?

I'm using the log viewer component. When I scroll to a particular line, say line 100 > then toggle the value of wrap text > the component re-renders and I'm taken to line 1.

You can see this behavior in the demo here: https://www.patternfly.org/v4/extensions/log-viewer#with-complex-toolbar

How do you reproduce the problem?
Provide steps to reproduce. A codepen or codesandbox demonstrating the problem is appreciated.

  1. Go to this demo: https://www.patternfly.org/v4/extensions/log-viewer#with-complex-toolbar
  2. Scroll to a line, say line 100
  3. Toggle the value of the Wrap Text checkbox
  4. You are taken to line 1

Expected behavior
A clear and concise description of the expected behavior.

Even after toggling the value of wrap text, the scroll position should be the same.

This is important because if the user arrives at a log line much after line 1, say something like 1000, tries to read the log by wrapping the text, and is taken to the 1st line, it will be very cumbersome for the user to find / arrive to the same line again in case they don't remember the line number.

Is this issue blocking you?
List the workaround if there is one.

I couldn't find a workaround.

Screenshots
If applicable, add screenshots to help explain the issue.

https://user-images.githubusercontent.com/62167899/209475803-00b63f06-20bd-4877-8f23-fe17a4cf80ed.mp4

What is your environment?

  • OS: Mac OS

  • Browser: Firefox

What is your product and what release date are you targeting?
I'm not sure I'm at liberty to disclose this information.

Any other information?


Jira Issue: PF-2009

Vorherrschende Sprache
TypeScript
Sterne
34
Forks
19
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus patternfly/react-log-viewer

Alle Issues in patternfly/react-log-viewer

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.