-
Notifications
You must be signed in to change notification settings - Fork 248
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
(feat) Add mode prop to React Form Engine component to handle different views #1678
Conversation
Size Change: +10 B (0%) Total Size: 10.7 MB ℹ️ View Unchanged
|
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.
Thanks @CynthiaKamau, I'm not sure whether including type
in the import statement is necessary, otherwise this looks fine to me.
If i do not specify its a type eslint will shout |
@@ -1,7 +1,7 @@ | |||
import React from 'react'; | |||
import { useTranslation } from 'react-i18next'; | |||
import { InlineLoading } from '@carbon/react'; | |||
import { OHRIForm } from '@openmrs/openmrs-form-engine-lib'; | |||
import { OHRIForm, type SessionMode } from '@openmrs/openmrs-form-engine-lib'; |
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.
@arodidev this is necessary because type annotations get removed when transpiling TS to JS
Requirements
Summary
The mode prop to OHRI form component will help in rendering different views eg read only view, edit view etc
Screenshots
Related Issue
Other