Skip to content

Commit

Permalink
chore: allow removing of all extraction fields
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersuweijie committed Oct 24, 2024
1 parent edbd0b6 commit cf318d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/app/src/components/entry-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export function EntryForm({ onFormSubmit, entry }: EntryFormProps) {

function uploadEmail(e: FormEvent<HTMLInputElement>) {
if (e.currentTarget.files) {
setIsProcessingEmail(false);
for (let i = 0; i < e.currentTarget.files.length; i++) {
const file = e.currentTarget.files[i];
const reader = new FileReader();
Expand Down Expand Up @@ -543,7 +544,7 @@ export function EntryForm({ onFormSubmit, entry }: EntryFormProps) {
{fields.map((v, i) => {
return (
<div className='pl-8 pb-4' key={v.id}>
<div className="flex flex-row items-center"><b>Field #{i + 1}</b>{(maskingEnabled || i !== 0) && <Trash color="red" className="ml-2" onClick={() => removeValueObject(i)} />}</div>
<div className="flex flex-row items-center"><b>Field #{i + 1}</b> <Trash color="red" className="ml-2" onClick={() => removeValueObject(i)} /></div>
<FormField
control={form.control}
name={`parameters.values.${i}.name`}
Expand Down

0 comments on commit cf318d5

Please sign in to comment.