Update Local Units#2206
Conversation
🦋 Changeset detectedLatest commit: 92b4a38 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
a73b862 to
e41b88c
Compare
e41b88c to
c7ed89c
Compare
c7ed89c to
e69bac1
Compare
AdityaKhatri
left a comment
There was a problem hiding this comment.
Only checked logical issues. Haven't run it locally.
|
|
||
| const strings = useTranslation(i18n); | ||
| const [confirmationText, setConfirmationText] = useState<string>(); | ||
| const [newValue, setNewValue] = useState(value); |
There was a problem hiding this comment.
Why is this required? I don't see a reason not to make this completely controlled.
There was a problem hiding this comment.
The temporary state is to trigger the confirmation, actual value is synchronized with the server!
| const localUnitTypeToIdMap = listToMap( | ||
| externallyManagedResponse?.results, | ||
| ({ local_unit_type_details }) => local_unit_type_details.id, | ||
| ({ id }) => id, | ||
| ); | ||
|
|
||
| const externallyManagedMapping = listToMap( | ||
| externallyManagedResponse?.results, | ||
| ({ local_unit_type_details }) => local_unit_type_details.id, | ||
| ({ enabled }) => enabled, | ||
| ); |
There was a problem hiding this comment.
Preferably should be memoized
| }, | ||
| }); | ||
|
|
||
| const localUnitTypeLabelMap = listToMap( |
shreeyash07
left a comment
There was a problem hiding this comment.
Left few comments and please check again if any translation strings are missing. @frozenhelium
| value={selectedLocalUnitType} | ||
| onChange={setSelectedLocalUnitType} | ||
| name="local_unit_type" | ||
| // disabled={pending} |
There was a problem hiding this comment.
if not needed remove this please check
There was a problem hiding this comment.
@frozenhelium you missed this lets do it in next round
There was a problem hiding this comment.
This will be taken care of during rebase
5964b0b to
e20a391
Compare
e20a391 to
a510205
Compare
a510205 to
eb83e4b
Compare
eb83e4b to
46551be
Compare
46551be to
769d770
Compare
769d770 to
78eb9ee
Compare
5d84977 to
de93875
Compare
de93875 to
92b4a38
Compare
Addresses
Depends on
Changes