kirchner / elm-selectize Goto Github PK
View Code? Open in Web Editor NEWselectize-like dropdown menu with autocompletion in elm
Home Page: http://package.elm-lang.org/packages/kirchner/elm-selectize/latest
License: Apache License 2.0
selectize-like dropdown menu with autocompletion in elm
Home Page: http://package.elm-lang.org/packages/kirchner/elm-selectize/latest
License: Apache License 2.0
Have you thought more about the multi-select API? Would love to be able to do what's on the demo now.
elm-selectize/elm-package.json
Line 16 in 2d68743
Would it be possible to update the constraints for, elm-community/list-extra
? Use of kirchner/elm-selectize
requires that I downgrade my version of list-extra
.
Trying to find the source behind the multi selectize in the demo but unable to. I thought it would be part of the demo/demo.elm, all I found though was this issue saying that it isn't implemented in this repo: #2 dating back to august.
So is the functionality shown in the demo implemented in the repo? Confused... if yes, how do I do multi selection? ( as on further investigation, there are commits related to it! :)
The build is failed due to Browser.Dom import. Is this fixed yet? Thank you
Is it possible to change the name of the CSS class container?
I want to use bootstrap which uses the same name for its container class.
Right now, SelectTree Message is emitted every time the User types in a Character or removes one.
I was under the impression that this Message will only be sent, if the User either selects an Item or clears the Selection.
Is the current behaviour desired?
When printing a page the selectize menu shows up as a gray box occluding other content.
Please add this CSS!
@media print { div.selectize__menu { display: none; } }
(I am aware that MultiSelectize is not publicly released yet)
This issue shows up in both my own project and the demo. On the demo page, notice that if I select "Kermit the Frog" and then immediately unselect it, that item is not immediately available again in the dropdown. Instead, I have to close the dropdown first and then re-open it. Alternatively, if I select "Miss Piggy," "Kermit the Frog" is available in the dropdown without reopening it.
The cause is that the handler for the UnselectAt
message does not touch the state
in Internal.MultiSelectize
, seen here.
UnselectAt position ->
( state
, focus state.id
, Just (unselect position)
)
Not updating the state here means that the change will not be picked up in the internal state until after the user unselects the item in their own model. Then the internal update will notice the change in another MultiSelectize.Msg
like OpenMenu
or Select.
I can submit a PR later if this fix is desired.
hello
is there an easier way to update the menu entries?
this is my code but it can't find Entry or Divider so it doesn't work...
SearchResponse ((RemoteData.Success items) as data) ->
let
menu =
model.textfieldMenu
addLabel e =
case e of
Entry a ->
LEntry a (toLabel a)
Divider text ->
LDivider text
labeledEntries =
List.concat [ [ Selectize.divider "Cities" ], webDataToList data |> List.map Selectize.entry ] |> List.map addLabel
in
( { model
| textfieldMenu =
{ menu
| entries =
labeledEntries
}
}
, Cmd.none
)
I already figured out that putting a Cmd.msg on textfieldSelection is a good way to capture selection
But what is a good way to access the value of Attributes.value query in autocomplete?
I assume one could change the model to be something like:
type alias Model =
- { selection : Maybe String
+ { selection : Maybe (List String)
, menu : Selectize.State String
}
Would have been lovely to see such an example (so I wouldn't have to do all the hard work, and just copy from what you've done ๐ )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.