elm package cache
Packages
Reroutes
About
lamdera.com
gribouille
/
elm-table
/
4.0.0
NOTE: the latest version is
5.3.0
README
About
Versions
Source
Modules
Table
Table component (in progress...).
Data
type
alias
Config
a b msg
=
{ pipe
:
State
-> msg
, columns
:
List
(
Column
a msg)
, pagination
:
Bool
, numsPage
:
List
Int
, initialNumPage
:
Int
, searchBar
:
Bool
, selectNumByPage
:
Bool
, hideColumn
:
Bool
, onChange
:
State
-> msg
, errorView
:
String
->
Error
->
Html
msg
, toolbar
:
List
(
Html
msg)
, selection
:
Bool
, getId
:
a ->
String
, getSubId
:
b ->
String
, subColumns
:
List
(
Column
b msg)
, getSubTable
:
a ->
List
b
, excludeSubSelection
:
Bool
}
TODO
type
alias
Data
a
=
{ total
:
Int
, rows
:
List
(
Row
a)
}
TODO
type
alias
Pipe
msg
=
(
State
,
State
-> msg )
TODO
type
Row
a
TODO
type
Rows
a
=
Static
(
List
(
Row
a))
|
Dynamic
(
Status
(
Data
a))
TODO
type
alias
State
=
{ visibleColumns
:
List
String
, orderBy
:
Maybe
String
, order
:
Sort
, page
:
Int
, byPage
:
Int
, search
:
String
, btPagination
:
Bool
, btColumns
:
Bool
, tmp
:
String
, selected
:
List
RowId
, subSelected
:
List
RowId
, expand
:
List
RowId
}
TODO
type
Status
a
=
Loading
|
Loaded
a
|
Failed
String
Error
TODO
init
:
Config
a b msg ->
State
TODO
loaded
:
Int
->
List
a ->
Status
(
Data
a)
TODO
Column
type
Column
a msg
=
Column
{ name
:
String
, abbrev
:
String
, width
:
String
, sortable
:
Bool
, hiddable
:
Bool
, searchable
:
Maybe
(a ->
String
)
, visible
:
Bool
, viewCell
:
a ->
Pipe
msg ->
List
(
Html
msg)
, viewHeader
:
Pipe
msg ->
List
(
Html
msg)
, comp
:
Maybe
(a -> a ->
Order
)
}
TODO
type
alias
Pagination
=
{ search
:
String
, orderBy
:
String
, order
:
Sort
, page
:
Int
, byPage
:
Int
}
TODO
type
Sort
=
Ascending
|
Descending
|
StandBy
TODO
col
:
(a -> a ->
Order
)
-> (a ->
Html
msg)
->
String
->
String
->
Bool
->
Bool
->
Maybe
(a ->
String
)
->
Column
a msg
TODO
colI
:
(a ->
Int
) ->
String
->
String
->
Bool
->
Bool
->
Column
a msg
TODO
colS
:
(a ->
String
) ->
String
->
String
->
Bool
->
Bool
->
Column
a msg
TODO
colSubS
:
(a ->
String
) ->
String
->
String
->
Column
a msg
TODO
errorDefaultView
:
String
->
Error
->
Html
msg
TODO
pagination
:
State
->
Pagination
TODO
withWidth
:
String
->
Column
a msg ->
Column
a msg
TODO
View
view
:
Config
a b msg ->
State
->
Rows
a ->
Html
msg
TODO
viewHeader
:
String
->
String
->
Bool
->
Pipe
msg ->
List
(
Html
msg)
TODO
withViewCell
:
(a ->
Pipe
msg ->
List
(
Html
msg)) ->
Column
a msg ->
Column
a msg
TODO
README
About
10 versions
Source
Modules
Table
TODO