Create a handler function that toggles an item in a filter array.

  • Type Parameters

    • T

    Parameters

    • currentValue: T[]

      Current filter array value

    • item: T

      Item to toggle

    • onUpdate: (value: T[]) => void

      Callback to update the filter

    Returns () => void

    Handler function