theKashey / react-focus-on

🎯 Solution for WAI ARIA compatible modal dialogs or full-screen tasks, you were looking for
MIT License
336 stars 14 forks source link

Allow ability to disable specific functionality #39

Closed davwheat closed 4 years ago

davwheat commented 4 years ago

In one of our components, we have a prop which allows you to be able to disable/enable scrolling while it's open. We'd like to keep this available for backwards compatibility.

What I propose is a prop like disableScrollLock to achieve this.

theKashey commented 4 years ago

Try scrollLock={false} prop, which is already supported by FocusOn - https://github.com/theKashey/react-focus-on/blob/master/src/UI.tsx#L19

Sorry - it's not documented in the Readme, however documented in types - https://github.com/theKashey/react-focus-on/blob/master/src/types.ts#L27

davwheat commented 4 years ago

Brilliant! Thanks for your help :)