Skip to content

Commit

Permalink
runfix: Add onChange handler to inputs in primary modal
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisamir98 committed Oct 11, 2022
1 parent e7ee472 commit 534e612
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/script/components/Modals/PrimaryModal/PrimaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,19 @@ export const PrimaryModalComponent: React.FC = () => {
type="password"
value={passwordValue}
placeholder={inputPlaceholder}
onChange={event => updatePasswordValue(event.target.value)}
/>
</form>
)}
{hasInput && (
<form onSubmit={() => doAction(confirm, !!closeOnConfirm)}>
<input maxLength={64} className="modal__input" value={inputValue} placeholder={inputPlaceholder} />
<input
maxLength={64}
className="modal__input"
value={inputValue}
placeholder={inputPlaceholder}
onChange={event => updateInputValue(event.target.value)}
/>
</form>
)}
{errorMessage && <div className="modal__input__error">{errorMessage}</div>}
Expand All @@ -154,6 +161,7 @@ export const PrimaryModalComponent: React.FC = () => {
id="clear-data-checkbox"
checked={optionChecked}
data-uie-name="modal-option-checkbox"
onChange={event => updateOptionChecked(event.target.checked)}
/>
<label className="label-xs" htmlFor="clear-data-checkbox">
<span className="modal-option-text text-background">{checkboxLabel}</span>
Expand Down

0 comments on commit 534e612

Please sign in to comment.