Skip to content

Commit

Permalink
Update useEffect dependencies to re-render components passed data tha…
Browse files Browse the repository at this point in the history
…t might change
  • Loading branch information
braytonstafford committed Jun 24, 2022
1 parent 8e34f62 commit 7585a2c
Show file tree
Hide file tree
Showing 55 changed files with 31 additions and 22 deletions.
Empty file modified .babelrc
100644 → 100755
Empty file.
Empty file modified .eslintignore
100644 → 100755
Empty file.
Empty file modified .eslintrc
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .npmignore
100644 → 100755
Empty file.
Empty file modified .prettierignore
100644 → 100755
Empty file.
Empty file modified .prettierrc
100644 → 100755
Empty file.
Empty file modified .travis.yml
100644 → 100755
Empty file.
9 changes: 9 additions & 0 deletions CHANGELOG.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

All notable changes to this project will be documented in this file.

### [v0.6.3][2022-06-23]

- Fix allergy table re-render on allergies change
- Fix condition table re-render on conditions change
- Fix medication table re-render on medications change
- Fix observation table re-render on observations change
- Fix observation detail re-render on observation change
- Fix patient card re-render on patient change
- Fix patient banner re-render on patient change
### [v0.5.7][2020-10-13]

- Fix full name on patient card
Expand Down
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified doczrc.js
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions package.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@healthintellect/fhir-ui",
"version": "0.5.7",
"name": "fhir-ui",
"version": "0.6.3",
"description": "React components to display HL7 FHIR data using Material-UI",
"homepage": "https://healthintellect.github.io/fhir-ui",
"bugs": {
Expand All @@ -20,7 +20,7 @@
"repository": {
"type": "git",
"url": "ssh://[email protected]:healthintellect/fhir-ui.git",
"directory": "@healthintellect/fhir-ui"
"directory": "fhir-ui"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/healthintellect"
Expand Down
Empty file modified rollup.config.js
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/components/allergy/AllergyTable.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ const AllergyTable = ({
}
setTableRows(allTableRows)
}
}, [])
}, [allergies])

return (
<Fragment>
Expand Down
Empty file modified src/components/allergy/AllergyTable.mdx
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/components/condition/ConditionTable.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ const ConditionTable = ({
}
setTableRows(allTableRows)
}
}, [])
}, [conditions])

return (
<Fragment>
Expand Down
Empty file modified src/components/condition/ConditionTable.mdx
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/components/medication/MedicationTable.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ const MedicationTable = ({
}
setTableRows(allTableRows)
}
}, [])
}, [medications])

return (
<Fragment>
Expand Down
Empty file modified src/components/medication/MedicationTable.mdx
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/components/observation/ObservationDetail.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const ObservationDetail = ({
dehydrateObservationResource(observation)
setObservationId(observation.identifier[0].value)
setCurrentObservation(observation)
}, [])
}, [observation])

const dehydrateObservationResource = observation => {
setForm(prevForm => ({
Expand Down
Empty file modified src/components/observation/ObservationDetail.mdx
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/components/observation/ObservationTable.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ const ObservationTable = ({
}
setTableRows(allTableRows)
}
}, [])
}, [observations])

return (
<Fragment>
Expand Down
Empty file modified src/components/observation/ObservationTable.mdx
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/components/patient/PatientBanner.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const PatientBanner = ({ patient }) => {

useEffect(() => {
dehydratePatientResource(patient)
}, [])
}, [patient])

const dehydratePatientResource = patient => {
if (patient && Object.keys(patient).length !== 0) {
Expand Down
Empty file modified src/components/patient/PatientBanner.mdx
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/components/patient/PatientCard.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const PatientCard = ({ patient, detailLink, fieldVariant }) => {
? patient.identifier
: 'Unknown',
}))
}, [])
}, [patient])

const updateCurrentPatient = e => {
e.preventDefault()
Expand Down
Empty file modified src/components/patient/PatientCard.mdx
100644 → 100755
Empty file.
Empty file modified src/components/patient/PatientDetail.mdx
100644 → 100755
Empty file.
Empty file modified src/components/patient/PatientTable.mdx
100644 → 100755
Empty file.
Empty file modified src/components/table/CustomDatePicker.js
100644 → 100755
Empty file.
Empty file modified src/components/table/TableHeader.js
100644 → 100755
Empty file.
Empty file modified src/components/table/TableNoData.js
100644 → 100755
Empty file.
Empty file modified src/components/table/TableToolbar.js
100644 → 100755
Empty file.
Empty file modified src/examples/allergies-example.mdx
100644 → 100755
Empty file.
Empty file modified src/examples/allergies.js
100644 → 100755
Empty file.
Empty file modified src/examples/condition-example.mdx
100644 → 100755
Empty file.
Empty file modified src/examples/conditions.js
100644 → 100755
Empty file.
Empty file modified src/examples/fhir-examples.js
100644 → 100755
Empty file.
Empty file modified src/examples/medications-example.mdx
100644 → 100755
Empty file.
Empty file modified src/examples/medications.js
100644 → 100755
Empty file.
Empty file modified src/examples/observation-example.mdx
100644 → 100755
Empty file.
Empty file modified src/examples/observation.js
100644 → 100755
Empty file.
Empty file modified src/examples/observations-example.mdx
100644 → 100755
Empty file.
Empty file modified src/examples/observations.js
100644 → 100755
Empty file.
Empty file modified src/examples/patient-bundle-example.mdx
100644 → 100755
Empty file.
Empty file modified src/examples/patient-bundle.js
100644 → 100755
Empty file.
Empty file modified src/examples/patient-example.mdx
100644 → 100755
Empty file.
Empty file modified src/examples/patient.js
100644 → 100755
Empty file.
Empty file modified src/examples/patients-example.mdx
100644 → 100755
Empty file.
Empty file modified src/examples/patients.js
100644 → 100755
Empty file.
Empty file modified src/gatsby-theme-docz/wrapper.js
100644 → 100755
Empty file.
Empty file modified src/index.js
100644 → 100755
Empty file.
18 changes: 9 additions & 9 deletions src/index.mdx
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ Please refer to each component's CodeSandbox.io example for an example on how to

## CodeSandbox.io Examples

- [PatientCard](https://codesandbox.io/s/fhir-ui-patient-card-demo-jzyi3)
- [PatientTable](https://codesandbox.io/s/fhir-ui-patient-table-demo-f2gkg)
- [PatientDetail](https://codesandbox.io/s/fhir-ui-patient-detail-demo-cuz95)
- [PatientBanner](https://codesandbox.io/s/fhir-ui-patient-banner-demo-dn88y)
- [ObservationTable](https://codesandbox.io/s/fhir-ui-observation-table-demo-86150)
- [ObservationDetail](https://codesandbox.io/s/fhir-ui-observation-detail-demo-5584s)
- [ConditionTable](https://codesandbox.io/s/fhir-ui-condition-table-demo-0wivy)
- [AllergyTable](https://codesandbox.io/s/fhir-ui-allergy-table-demo-ynk75)
- [MedicationTable](https://codesandbox.io/s/fhir-ui-medication-table-demo-i2d7i)
- [PatientCard](https://codesandbox.io/s/fhir-ui-patient-card-demo-yq5yg)
- [PatientTable](https://codesandbox.io/s/fhir-ui-patient-table-demo-4dbfx)
- [PatientDetail](https://codesandbox.io/s/fhir-ui-patient-detail-demo-9jhx6)
- [PatientBanner](https://codesandbox.io/s/fhir-ui-patient-banner-demo-1u9lm)
- [ObservationTable](https://codesandbox.io/s/fhir-ui-observation-table-demo-7nn4q)
- [ObservationDetail](https://codesandbox.io/s/fhir-ui-observation-detail-demo-2qcio)
- [ConditionTable](https://codesandbox.io/s/fhir-ui-condition-table-demo-7x4gm)
- [AllergyTable](https://codesandbox.io/s/fhir-ui-allergy-table-demo-g2kgo)
- [MedicationTable](https://codesandbox.io/s/fhir-ui-medication-table-demo-hxrt9)

## License

Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4327,9 +4327,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001135:
version "1.0.30001148"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001148.tgz#dc97c7ed918ab33bf8706ddd5e387287e015d637"
integrity sha512-E66qcd0KMKZHNJQt9hiLZGE3J4zuTqE1OnU53miEVtylFbwOEmeA5OsRu90noZful+XGSQOni1aT2tiqu/9yYw==
version "1.0.30001359"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001359.tgz"
integrity sha512-Xln/BAsPzEuiVLgJ2/45IaqD9jShtk3Y33anKb4+yLwQzws3+v6odKfpgES/cDEaZMLzSChpIGdbOYtH9MyuHw==

capitalize@^2.0.0:
version "2.0.3"
Expand Down

0 comments on commit 7585a2c

Please sign in to comment.