Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype AssumedRowHeight = AssumedRowHeight Int
- newtype AssumedTableHeight = AssumedTableHeight Int
- newtype CurrentScrollY = CurrentScrollY Int
- class Tabular a => LazyTabular a where
- data LazyTable a = LazyTable a AssumedTableHeight AssumedRowHeight CurrentScrollY RowsToShow RowsLoaded (Paginator a) (SortCol a) [Row (LazyTable a)]
- type DebounceScroll m a = (RawNode -> RawEvent -> JSM (Continuation m a)) -> RawNode -> RawEvent -> JSM (Continuation m a)
- data LazyTableScrollConfig m a b
- = ContainerIsScrollable (DebounceScroll m (b, CurrentScrollY, RowsLoaded))
- | TbodyIsScrollable (DebounceScroll m (LazyTable a, SortCol (LazyTable a)))
- newtype Offset = Offset Int
- newtype Length = Length Int
- data Page = Page {
- pageOffset :: Offset
- pageLength :: Length
- newtype RowsToShow = RowsToShow {
- unRowsToShow :: Int
- newtype RowsLoaded = RowsLoaded {
- unRowsLoaded :: Int
- newtype Paginator a = Paginator {
- unPaginator :: forall m. (Applicative m, Effect a m) => a -> SortCol a -> Page -> m a
- lazyLoadingTable :: forall m a b. (LazyTabular a, Monad m, Effect a m, Humanize (Column a), Bounded (Column a), Ord (Column a), Enum (Column a)) => Paginator a -> RowsLoaded -> Theme m a -> AssumedTableHeight -> AssumedRowHeight -> LazyTableScrollConfig m a b -> (Html m ((a, SortCol a), CurrentScrollY, RowsLoaded) -> Html m (b, CurrentScrollY, RowsLoaded)) -> a -> SortCol a -> CurrentScrollY -> Html m (b, CurrentScrollY, RowsLoaded)
- lazyTable :: forall m a b. (LazyTabular a, Monad m, Effect a m, Humanize (Column a), Bounded (Column a), Ord (Column a), Enum (Column a)) => Theme m a -> AssumedTableHeight -> AssumedRowHeight -> LazyTableScrollConfig m a b -> (Html m ((a, SortCol a), CurrentScrollY) -> Html m (b, CurrentScrollY)) -> a -> SortCol a -> CurrentScrollY -> Html m (b, CurrentScrollY)
Documentation
newtype AssumedRowHeight Source #
Instances
newtype AssumedTableHeight Source #
Instances
newtype CurrentScrollY Source #
Instances
LazyTable a AssumedTableHeight AssumedRowHeight CurrentScrollY RowsToShow RowsLoaded (Paginator a) (SortCol a) [Row (LazyTable a)] |
Instances
type DebounceScroll m a = (RawNode -> RawEvent -> JSM (Continuation m a)) -> RawNode -> RawEvent -> JSM (Continuation m a) Source #
data LazyTableScrollConfig m a b Source #
ContainerIsScrollable (DebounceScroll m (b, CurrentScrollY, RowsLoaded)) | |
TbodyIsScrollable (DebounceScroll m (LazyTable a, SortCol (LazyTable a))) |
Instances
Generic (LazyTableScrollConfig m a b) Source # | |
Defined in Shpadoinkle.Widgets.Table.Lazy from :: LazyTableScrollConfig m a b -> Rep (LazyTableScrollConfig m a b) x Source # to :: Rep (LazyTableScrollConfig m a b) x -> LazyTableScrollConfig m a b Source # | |
type Rep (LazyTableScrollConfig m a b) Source # | |
Defined in Shpadoinkle.Widgets.Table.Lazy type Rep (LazyTableScrollConfig m a b) = D1 (MetaData "LazyTableScrollConfig" "Shpadoinkle.Widgets.Table.Lazy" "Shpadoinkle-widgets-0.2.0.1-HaWUIlNGtuO41rdsllvehE" False) (C1 (MetaCons "ContainerIsScrollable" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (DebounceScroll m (b, CurrentScrollY, RowsLoaded)))) :+: C1 (MetaCons "TbodyIsScrollable" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (DebounceScroll m (LazyTable a, SortCol (LazyTable a)))))) |
Instances
Instances
Page | |
|
Instances
newtype RowsToShow Source #
Instances
newtype RowsLoaded Source #
Instances
A Paginator takes a tabular data type a
and a sort order and a page and returns an action which yields a new tabular value with the values in the given page range included.
Paginator | |
|
lazyLoadingTable :: forall m a b. (LazyTabular a, Monad m, Effect a m, Humanize (Column a), Bounded (Column a), Ord (Column a), Enum (Column a)) => Paginator a -> RowsLoaded -> Theme m a -> AssumedTableHeight -> AssumedRowHeight -> LazyTableScrollConfig m a b -> (Html m ((a, SortCol a), CurrentScrollY, RowsLoaded) -> Html m (b, CurrentScrollY, RowsLoaded)) -> a -> SortCol a -> CurrentScrollY -> Html m (b, CurrentScrollY, RowsLoaded) Source #
lazyTable :: forall m a b. (LazyTabular a, Monad m, Effect a m, Humanize (Column a), Bounded (Column a), Ord (Column a), Enum (Column a)) => Theme m a -> AssumedTableHeight -> AssumedRowHeight -> LazyTableScrollConfig m a b -> (Html m ((a, SortCol a), CurrentScrollY) -> Html m (b, CurrentScrollY)) -> a -> SortCol a -> CurrentScrollY -> Html m (b, CurrentScrollY) Source #