uiwjs / uiwjs/react-codemirror
Disable Virtual Scrolling in @uiw/react-codemirror
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am currently using @uiw/react-codemirror to implement key selection functionality in my project. Upon inspecting the elements in the browser's developer tools, I noticed that virtual scrolling is enabled, which leads to DOM manipulations during user scrolls. Specifically, some div elements are being removed and new ones are added dynamically.
While I understand and appreciate the efficiency that virtual scrolling offers, I would like to know if there is a way to disable this feature. My requirement is to maintain the scroll functionality without the DOM manipulations. Ideally, once the ReactCodeMirror component loads, all the div elements should be rendered at once without any further modifications during scrolling.
Version Details
@uiw/react-codemirror: ^4.22.1
Code Example
<ReactCodeMirror
value={value}
height="30vh"
language="json"
readOnly
placeholder="Enter URL and hit send to get a response"
onChange={onChange}
extensions={[json()]}
padding={15}
style={{
fontFamily: "ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace",
border: "0 !important",
borderRadius: 12,
}}
onClick={handleOnClickApiResponse}
/>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the provided ReactCodeMirror example and @uiw/react-codemirror version ^4.22.1, then trace how the component configures CodeMirror scrolling. Done means providing a supported way to keep scrolling while rendering all div elements without DOM changes during scroll, with the behavior verified in an equivalent example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100