-
-
Notifications
You must be signed in to change notification settings - Fork 6
feat: include relative path as argument to render each node in tree view #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 21 commits
df06a05
db3a6d5
a1a79d1
309b839
b4dd5d0
aeabe32
e8b1fde
7946ed5
5f132d7
826f303
7e28557
b667759
82f3656
731203c
29d5f73
3f94b88
e13ac88
a1d1119
31d7e40
8d90a95
5c963e5
c1d88e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,9 +53,9 @@ export function TreeViewExamples() { | |
return ( | ||
<TreeView | ||
nodes={nodes} | ||
template={(item, index, parentItem) => ( | ||
template={(item, index, parentItem, relativePath) => ( | ||
<em> | ||
{item.attrA} (index: {index} parent: {parentItem?.attrA || <em>None</em>}) | ||
{item.attrA} (index: {index} parent: {parentItem?.attrA || <em>None</em>})<p>Path: {relativePath}</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</em> | ||
)} | ||
childrenPath={'children'} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
"main": "dist/main.js", | ||
"scripts": { | ||
"build": "rollup --config", | ||
"start": "webpack-dev-server --mode development", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"start": "webpack serve --mode development", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. after a little research a found this solution There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, move this change to another PR, because it is not related to the feature proposed here |
||
"docs": "webpack --mode development", | ||
"release": "standard-version", | ||
"prepublishOnly": "npm run build", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ module.exports = [ | |
{ | ||
entry: './demo/demo.jsx', | ||
output: { | ||
path: `${__dirname}/demo`, | ||
path: `${__dirname}/`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, move this change to another PR, because it is not related to the feature proposed here |
||
filename: 'demo.js', | ||
}, | ||
devServer: { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the idea here is to facilitate the usage of the TreeView Component with Forms.