web icon indicating copy to clipboard operation
web copied to clipboard

Update `panOnScrollMode` docs.

Open hayleigh-dot-dev opened this issue 9 months ago • 0 comments

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

hayleigh-dot-dev avatar May 09 '24 13:05 hayleigh-dot-dev