SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function onReselect

    • An onClick for a MenuItem inside a MUI Select: what to do when the item picked is the one the dropdown already shows.

      Type Parameters

      • T

      Parameters

      • shown: T
      • item: T
      • apply: () => void

      Returns () => void

      Select fires onChange only for a DIFFERENT value. But the pane shows the ANCHOR cell's format, and the rest of a multi-cell selection need not match it — so picking Accounting over an anchor that is already Accounting is a request to make the whole selection so, not a no-op. Select runs an item's own onClick before deciding whether anything changed, which makes it the hook for that case.