Closed lukasturcani closed 2 years ago
Currently, this would be a major change. I'd like it to instead be a minor one, so please instead of changing the type signature of a function, create a V2 version. So SortTableV2, ColumnV2, sortTableV2, floatColumnV2, intColumnV2, stringColumnV2
and unsortableColumnV2
.
Regarding the wrapped El. Yes, you will have to wrap it in an Element.
Ok updated:
Internal.SortTableV2
sortTableV2
also uses the style, SortTableStyle
from Internal.SortTable
Internal.SortTableV2
are copies of functions from Internal.SortTable
but with type signatures modified to be polymorphic on the msg
type. The sortTableV2
function is slightly modified to work with the CustomColumn
.Page.SortTableV2
and updated explorer/src/Main.elm
to use itdocs/assets/sortTableV2.png
CustomColumn
are automatically placed into an Element.el
to prevent scaling issues by defaultAlso updated docs.json
Note
I have a question:
Should the element be automatically wrapped in an
Element.el?
For example, this code
leads to
I have to do
to make it look right
I could edit the PR so that
Element.el
is used automatically, and the user does not have to write it, but I'm wondering if this can cause issues in other cases?Description
sortTable
to allow the embedding of arbitraryElement
into columns.Column
andColumnType
types polymorphic on amsg
type variable. This allows them to hold data of typeElement msg
Column a msg
andColumnType a msg
ColumnType
,ElementType
, which is used to construct columns which holdElement msg
dataelementColumn
forColumn
instances, which have values of typeElement msg
sortTable
to handleElementColumn
data.ElementColumn
data is not sortable.view
insortTable
. See https://github.com/Orasund/elm-ui-widgets/pull/85/files#r771978681sortTable
to include example ofelementColumn
usePull request solving issue #84.
Please only open Pull Requests for existing issues.
Checklist for new Widget
src/Internal/[Your Widget].elm
src/Internal/Material/[Your Widget].elm
src/Widget.Material.elm
:src/Internal/Material/[Your Widget].elm
src/Widget.elm
:src/Internal/[You Widget].elm
elm-verify-examples && elm-test
to test the exampleOptional:
explorer/src/Page/[Your Widget].elm
and added it toexplorer/src/Main.elm