Comments (4)
Well, I've just added blueprint tooltip wrapper to tree items and it worked for me...
Not the best option for a 'light weight lib' to add blueprint to dependencies though;
from react-folder-tree.
Hi Nick,
Seems that we currently don't have a way to attach mouse event handler 😢
I guess it won't be too hard to add a onNodeHover
callback in next version, which has similar arguments with the existing onNameClick
handler.
However, I am not sure so far what's the best way to support "DOM related" callback, I mean for "data related callback", it is super easy, like what we have:
const onNameClick = ({ nodeData }) => { ... };
if we need to show a tooltip, maybe we can have something like this? Although it doesn't look very 'React'
const onNodeHover = ({ nodeData, refToNodeDOM }) => { showTooltip(refToNodeDOM); };
Let me know if you have any idea about it, and thanks for this feature suggestion!
By the way if we just need to support a very specific hover handler (like a tooltip), but not a general on hover interface, it should be achievable, feel free to fork the code and implement a react-folder-tree-with-tooltip, and I am happy to answer any question about the codes : )
from react-folder-tree.
and for 'Per tree item', events could be distinguished by it's node data, for example
const onNodeHover = ({ nodeData, refToNodeDOM }) => {
if (nodeData.tooltipInfo) {
showTooltip(refToNodeDOM, nodeData.tooltipInfo);
}
};
let me know if you have any better ideas.
from react-folder-tree.
glad to hear it worked out for you!
from react-folder-tree.
Related Issues (20)
- Show toolbar only in clicked folders HOT 1
- The possibility of adding custom icons to add files and add folders
- Add the ability to search on the tree structure
- Remove checkbok only on files
- My hateCheckbox attribute doesn't work
- Usage with remix HOT 1
- Add support for auto selection of an item having same key/_id across the tree at different levels
- Type specification for every child HOT 1
- Cannot set properties of null (setting '_id') HOT 3
- Selection of only single child makes its parent fully checked, is there a way to make it half checked HOT 2
- How can I add new custom params when I add a file or folder.
- delete root folder HOT 2
- Delete a "branch"
- border of name edition
- edit name directly
- Specify css for each TreeNode of each folder tree
- Infinite render loop
- ReferenceError: self is not defined HOT 1
- how can i remove checkbox and add radio button imnstead of them and if this is not possible then how can i make the checkboxes like radio buttons with respect to functionality means only one selectable at a time
- Highlight Filename on Click
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 react-folder-tree.