Closed ranjanan closed 6 years ago
Thanks! This was something I had forgotten to do. I left a few comments, in particular:
nothing
, a string or a Observable
).I actually like the idea of having the observable start at nothing
and in the @manipulate
the @manipulate for x = nothing
could create a file selection widget. Say:
@manipulate for x = nothing
x != nothing && histogram(column(loadtable(x), 1))
end
Merging #36 into master will decrease coverage by
0.85%
. The diff coverage is33.33%
.
@@ Coverage Diff @@
## master #36 +/- ##
==========================================
- Coverage 68.11% 67.25% -0.86%
==========================================
Files 13 13
Lines 276 281 +5
==========================================
+ Hits 188 189 +1
- Misses 88 92 +4
Impacted Files | Coverage Ξ | |
---|---|---|
src/input.jl | 86.32% <33.33%> (-2.97%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update e77483e...c0e127d. Read the comment docs.
The tests pass and it works for all sensible inputs:
julia> using InteractBase
julia> filepicker(value = "hello")
(div { className="interact-widget" }
(input { attributes=Dict{Any,Any}(Pair{Any,Any}("class", "interact-widget "),Pair{Any,Any}("type", "file"),Pair{Any,Any}("v-on:change", "onFileChange"),Pair{Any,Any}("ref", "data")) }))
julia> filepicker()
(div { className="interact-widget" }
(input { attributes=Dict{Any,Any}(Pair{Any,Any}("class", "interact-widget "),Pair{Any,Any}("type", "file"),Pair{Any,Any}("v-on:change", "onFileChange"),Pair{Any,Any}("ref", "data")) }))
julia> using Observables
julia> filepicker(value = Observable{Any}("hello"))
(div { className="interact-widget" }
(input { attributes=Dict{Any,Any}(Pair{Any,Any}("class", "interact-widget "),Pair{Any,Any}("type", "file"),Pair{Any,Any}("v-on:change", "onFileChange"),Pair{Any,Any}("ref", "data")) }))
Nice job!
Firstly, thank you for such a useful package! This package greatly simplifies writing Web-based UIs . π
I was hoping to make a simple contribution. This PR modifies
filepicker
to take in a default observable, much likecheckbox
, for example.