fui-material 2.6.1 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -843,15 +843,17 @@ const FTable = ({
843
843
  // По умолчанию горизонтальное переполнение автоматическое
844
844
  overflowY = "auto",
845
845
  // По умолчанию вертикальное переполнение автоматическое
846
+ isSticky = true,
847
+ // По умолчанию заголовок не "липкий"
846
848
  ...props
847
849
  }) => {
848
850
  const tableWrapperRef = useRef(null);
849
- const [isSticky, setIsSticky] = useState(false);
851
+ const [isStickyState, setIsStickyState] = useState(false);
850
852
  useEffect(() => {
851
853
  const handleScroll = () => {
852
- if (tableWrapperRef.current) {
854
+ if (tableWrapperRef.current && isSticky) {
853
855
  const isScrolled = tableWrapperRef.current.scrollTop > 0;
854
- setIsSticky(isScrolled);
856
+ setIsStickyState(isScrolled);
855
857
  }
856
858
  };
857
859
  const wrapper = tableWrapperRef.current;
@@ -883,7 +885,7 @@ const FTable = ({
883
885
  child,
884
886
  {
885
887
  ...headProps,
886
- isSticky
888
+ isSticky: isStickyState
887
889
  }
888
890
  );
889
891
  }