xyflow / web

📖 This monorepo contains the xyflow website and the documentation sites for React Flow and Svelte Flow.
https://xyflow.com
MIT License
43 stars 49 forks source link

Update `panOnScrollMode` docs. #385

Closed hayleigh-dot-dev closed 4 months ago

hayleigh-dot-dev commented 4 months ago

Code of Conduct

Which site are you suggesting a change for?

reactflow.dev

What content is affected by this change?

/api-reference/react-flow#pan-on-scroll

What part(s) of the article would you like to see updated?

These docs use a string union "free" | "horizontal" | "vertical" as the type, but internally we're using a PanOnScrollMode enum. Enums are nominal in typescript so attempting to set things as a string directly, although valid javascript, won't type check.

We should update the documentation and also add the enum to the documented types.

Additional information

No response