Comments (4)
I don't know anything about Material Design, but there are some others who have used it with Vecty in the past:
- https://github.com/vecty-components/material
- https://gitlab.com/agamigo/material
- https://github.com/wizenerd/ui
You should make certain that any DOM elements the material design library will attempt to modify on its own are isolated, i.e. using a vecty.Div
with vecty.UnsafeHTML
so that it is treated as an opaque element not owned by Vecty. See code example and further discussion around this in #236 (comment)
The other things you may wish to look at are the Mounter, Unmounter, and RenderSkipper interfaces:
- https://pkg.go.dev/github.com/hexops/vecty#Mounter
- https://pkg.go.dev/github.com/hexops/vecty#Unmounter
- https://pkg.go.dev/github.com/hexops/vecty#RenderSkipper
Hope that helps!
from vecty.
I think Material Design expects the user to also hold onto the javascript handle to the component so as to have feedback to user inputs i.e. Current level of the slider.
from vecty.
@slimsag Thank you so much! I'll look into it!
from vecty.
@slimsag sure enough Mount and RenderSkip worked like a charm. HAve not gotten around to using Unmount() yet, but if it works like I think it does and given Material.js has destroyer methods, should work just fine. Thank you again for your amazing explanations and for maintaining this great package 👍
For posterity, here's the fix I applied: soypat/mdc@ea67825. Look for the Mount() and RenderSkip() implementations on Slider and Tooltip types.
from vecty.
Related Issues (20)
- Add a basic example on usage HOT 5
- allow global panic handler HOT 2
- removeChild crashes if parent node is nil HOT 1
- [feature request] static HTML/CSS components HOT 6
- Examples go.mod file conflict HOT 1
- Add snake videogame example. HOT 4
- question: What is this prop vs. state idea HOT 3
- Instrumenting panic messages HOT 8
- Porting gopherjs js calls to use with vecty HOT 2
- Document the availability of vecty project template generator HOT 1
- Return type of If function
- prop.Value("") does not produce the correct html on first render
- Vecty needs an official website HOT 10
- The slack invite link in readme is broken
- vecty docs HOT 1
- How to update a rendered element? HOT 10
- Failed Running The Example HOT 8
- Todo MVC example has misleading usage of p.Items HOT 2
- Rerendering List Replaces First ListItem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vecty.