Calculates the compound z-index by adding the given index to the maxStackIndex from the GlobalStackingContext.
Locks the max stack index at its value when mounted to avoid infinite rerender issues. Should therefore be called
in a component that is conditionally rendered to account for changes to the maximum stack index (e.g. in the floating
element component itself or a wrapper around the floating element component).
Parameters
index: number = 1
The z-index relative to the global maximum stack index.
Calculates the compound z-index by adding the given
indexto themaxStackIndexfrom theGlobalStackingContext. Locks the max stack index at its value when mounted to avoid infinite rerender issues. Should therefore be called in a component that is conditionally rendered to account for changes to the maximum stack index (e.g. in the floating element component itself or a wrapper around the floating element component).