Skip to content

Resolved Bug 2021 : Premium Support > Save Button Is Not Enabled Even After All Mandatory Fields Has The Value #2022

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

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 @@ -106,7 +106,7 @@ const RdsCompPremiumSupport = (props: RdsCompPremiumSupportProps) => {
label={true}
labelPosition={LabelPosition.Top}
placeholder="Enter Name"
// required
required
size={InputSize.Medium}
value={premiumSupportData?.name}
onChange={(e: any) => {
Expand All @@ -122,7 +122,7 @@ const RdsCompPremiumSupport = (props: RdsCompPremiumSupportProps) => {
label={true}
labelPosition={LabelPosition.Top}
placeholder="Enter Email"
// required
required
size={InputSize.Medium}
value={premiumSupportData?.email}
onChange={(e: any) => {
Expand Down Expand Up @@ -157,6 +157,8 @@ const RdsCompPremiumSupport = (props: RdsCompPremiumSupportProps) => {
label="Message"
isMandatory
placeholder="Enter your extra message about your invoice"
value={premiumSupportData?.message}
onChange={(value: any) => handlePremiumSupportDataChanges(value, "message")}
/>
</div>

Expand All @@ -182,7 +184,7 @@ const RdsCompPremiumSupport = (props: RdsCompPremiumSupportProps) => {
tooltipTitle={""}
type={"submit"}
databsdismiss="offcanvas"
isDisabled={!premiumSupportData.phoneNumber || !premiumSupportData.message}
isDisabled={!premiumSupportData.phoneNumber || !premiumSupportData.message || !premiumSupportData.name || !premiumSupportData.email}
onClick={(e: any) => emitSaveData(e)}
></RdsButton>
</div>
Expand Down
5 changes: 3 additions & 2 deletions raaghu-elements/src/rds-text-editor/rds-text-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ const RdsTextEditor = (props: RdsTextEditorProps) => {
}, [props.value, props.showTitle]);

const handleChange = (value: string, delta: any, source: any, editor: any) => {
setValue(value);
const normalizedValue = value === "<p><br></p>" ? "" : value; // Normalize empty value
setValue(normalizedValue);
setIsTouch(true);
if (props.onChange) {
props.onChange(value, delta, source, editor);
props.onChange(normalizedValue, delta, source, editor);
}
};

Expand Down
Loading