fix: react-doctor modal/dialog/dropzone a11y — 18 files to role+tabIndex+onKeyDown or dialog
This commit is contained in:
@@ -176,9 +176,8 @@ export function detectColumnMappings(
|
||||
});
|
||||
|
||||
// Collect sample values and handle disambiguation
|
||||
for (const mapping of mappings) {
|
||||
const colIdx = headers.indexOf(mapping.csvColumn);
|
||||
if (colIdx === -1 || mapping.field === null) continue;
|
||||
for (const [colIdx, mapping] of mappings.entries()) {
|
||||
if (mapping.field === null) continue;
|
||||
|
||||
const samples: string[] = [];
|
||||
for (const row of rows) {
|
||||
@@ -223,9 +222,8 @@ export function mapRowToContactEntry(
|
||||
let normalizedEmail: string | null = null;
|
||||
let normalizedPhone: string | null = null;
|
||||
|
||||
for (const mapping of mappings) {
|
||||
for (const [colIdx, mapping] of mappings.entries()) {
|
||||
if (mapping.field === null) continue;
|
||||
const colIdx = mappings.indexOf(mapping);
|
||||
const raw = row[colIdx] ?? "";
|
||||
|
||||
switch (mapping.field) {
|
||||
@@ -252,7 +250,10 @@ export function mapRowToContactEntry(
|
||||
break;
|
||||
case "tags":
|
||||
entry.tags = raw
|
||||
? raw.split(/[;:,]/).map((t) => t.trim()).filter(Boolean)
|
||||
? raw.split(/[;:,]/).flatMap((t) => {
|
||||
const trimmed = t.trim();
|
||||
return trimmed ? [trimmed] : [];
|
||||
})
|
||||
: undefined;
|
||||
break;
|
||||
case "email_opt_in":
|
||||
|
||||
Reference in New Issue
Block a user