-
-
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
Conversation
@@ -53,9 +53,9 @@ export function TreeViewExamples() { | |||
return ( | |||
<TreeView | |||
nodes={nodes} | |||
template={(item, index, parentItem) => ( | |||
template={(item, index, parentItem, relativePath) => ( |
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.
<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 comment
The reason will be displayed to describe this comment to others. Learn more.
package.json
Outdated
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
package.json
Outdated
@@ -5,7 +5,7 @@ | |||
"main": "dist/main.js", | |||
"scripts": { | |||
"build": "rollup --config", | |||
"start": "webpack-dev-server --mode development", | |||
"start": "webpack serve --mode development", |
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.
after a little research a found this solution
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.
Please, move this change to another PR, because it is not related to the feature proposed here
webpack.config.js
Outdated
@@ -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 comment
The 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 comment
The 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
package.json
Outdated
@@ -5,7 +5,7 @@ | |||
"main": "dist/main.js", | |||
"scripts": { | |||
"build": "rollup --config", | |||
"start": "webpack-dev-server --mode development", | |||
"start": "webpack serve --mode development", |
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.
Please, move this change to another PR, because it is not related to the feature proposed here
webpack.config.js
Outdated
@@ -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 comment
The 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
No description provided.