OneScript

interactiveDismissDisabled

Prevent swipe to dismiss.

interactiveDismissDisabled(disabled = true) applies to a view inside sheet or other presented content and stops the user from swiping it away. The script then closes it by setting isPresented to false, for example from a Done button inside the content.

import { Form, Modifier, TextField } from "onescript/views"

<Form modifier={Modifier.interactiveDismissDisabled(draft !== "")}>
  <TextField
    value={draft}
    onChange={setDraft}
    prompt="Title"
  />
</Form>

How is this guide?

Last updated on