Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-finder
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Яков
react-finder
Commits
84ef543e
Commit
84ef543e
authored
Aug 17, 2021
by
Яков
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add func renderHeaderColumn
parent
7bd49cc7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
package.json
package.json
+10
-0
ReactFinder.js
src/ReactFinder.js
+8
-4
No files found.
package.json
View file @
84ef543e
...
@@ -86,5 +86,15 @@
...
@@ -86,5 +86,15 @@
},
},
"resolutions"
:
{
"resolutions"
:
{
"graceful-fs"
:
"^4.2.4"
"graceful-fs"
:
"^4.2.4"
},
"babel"
:
{
"presets"
:
[
"@babel/preset-react"
,
"@babel/preset-env"
],
"plugins"
:
[
"@babel/plugin-transform-react-jsx"
,
"@babel/plugin-proposal-class-properties"
]
}
}
}
}
src/ReactFinder.js
View file @
84ef543e
...
@@ -122,18 +122,22 @@ class ReactFinder extends PureComponent {
...
@@ -122,18 +122,22 @@ class ReactFinder extends PureComponent {
}
}
renderDetail
()
{
renderDetail
()
{
const
{
renderDetail
,
dataSource
,
nodeKey
,
childrenPropName
}
=
this
.
props
;
const
{
renderDetail
,
dataSource
,
nodeKey
,
childrenPropName
}
=
this
.
props
;
const
{
selectedKey
}
=
this
.
state
;
const
{
selectedKey
}
=
this
.
state
;
const
el
=
renderDetail
&&
renderDetail
({
const
el
=
renderDetail
&&
renderDetail
({
selectedKey
,
selectedKey
,
selectedData
:
findInTree
(
selectedData
:
findInTree
(
dataSource
,
dataSource
,
n
=>
n
[
nodeKey
]
===
selectedKey
,
{
childrenName
:
childrenPropName
}
n
=>
n
[
nodeKey
]
===
selectedKey
,
{
childrenName
:
childrenPropName
}
)
)
});
});
if
(
el
)
{
if
(
el
)
{
return
(
<
div
className
=
"react-finder-detail"
>
{
el
}
<
/div>
)
;
return
(
<
div
className
=
"react-finder-detail"
>
{
el
}
<
/div
>
);
}
}
return
null
;
return
null
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment