Skip to content
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

Closes #643 - Updated edit dialog for new primeReact version #764

Merged
merged 2 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"next": "^9.3.2",
"primeflex": "^1.0.0-rc.1",
"primeicons": "^1.0.0",
"primereact": "^3.1.7",
"primereact": "^4.2.1",
"prop-types": "^15.7.2",
"randexp": "^0.5.3",
"react": "^16.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class SourceTree extends React.Component {
state = {
tree: [treeUtils.rootNode],
selectedSources: {},
initialized: false,
};

render() {
Expand All @@ -28,20 +29,20 @@ class SourceTree extends React.Component {
);
}

componentDidUpdate = (prevProps) => {
componentDidUpdate = () => {
/**
* initializing tree when the component becomes visible
* makes it more likely for the files already beeing fetched
* and this.props.files to not be empty
*/
if (!prevProps.visible && this.props.visible) {
if (!this.state.initialized) {
const newTree = [
{
...treeUtils.rootNode,
children: cloneDeep(this.props.files),
},
];
this.setState({ tree: newTree });
this.setState({ tree: newTree, initialized: true });
return;
}

Expand Down
8 changes: 4 additions & 4 deletions components/inspectit-ocelot-configurationserver-ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5817,10 +5817,10 @@ primeicons@^1.0.0:
resolved "https://registry.yarnpkg.com/primeicons/-/primeicons-1.0.0.tgz#90061f168ef6227f21f0a7db8204ffa85cd27aec"
integrity sha512-p/hzIjUVccW4eJPhuORHI3AUkDpqfvCQVrjxbFEejnTEdWY4C8fomVfjiaA9jCu83fSQnBHuRIGB96iAR8R6uA==

primereact@^3.1.7:
version "3.4.0"
resolved "https://registry.yarnpkg.com/primereact/-/primereact-3.4.0.tgz#cbc0534abd4917355975d0213b612df49f44d880"
integrity sha512-XsLkInlYsFSK5/FRAM0JMyJEc+9lyI6feKJLNbQIwpker6mk587T3uwfZd8RYhmUGpj/jKEnZ+3V9tl+PKniAg==
primereact@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/primereact/-/primereact-4.2.1.tgz#535f1baf3729490d33798bb3f7cce954920329b9"
integrity sha512-i8+ZvbbbaZl0gNTCmEkDyCUStBu6sWNjM5wypTKmP5YT0DAL1sLdqiQKQrZGh4elDDMDYJ2Mz6wCjZS34nwcMw==

private@^0.1.6, private@^0.1.8:
version "0.1.8"
Expand Down