Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: remove autocomplete on filter bar and update filter actions (#43020)

Ali Waseemb764e57b6593
diff --git a/packages/ui-patterns/src/FilterBar/FilterCondition.tsx b/packages/ui-patterns/src/FilterBar/FilterCondition.tsx
index 8f7b2425a3f..4a7d4c7cdeb 100644
--- a/packages/ui-patterns/src/FilterBar/FilterCondition.tsx
+++ b/packages/ui-patterns/src/FilterBar/FilterCondition.tsx
@@ -242,11 +242,15 @@ export function FilterCondition({
onFocus={() => handleOperatorFocus(path)}
onBlur={handleOperatorBlur}
onKeyDown={handleOperatorKeyDown}
- className="h-full border-none bg-transparent py-0 px-1 text-center text-xs focus:outline-none focus:ring-0 focus:shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 text-brand w-full absolute left-0 top-0"
+ className="h-full border-none bg-transparent py-0 px-1 text-center text-xs focus:outline-none focus:ring-0 focus:shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 text-foreground w-full absolute left-0 top-0"
disabled={isLoading}
aria-label={`Operator for ${property.label}`}
data-testid={`filter-operator-${property.name}`}
tabIndex={-1}
+ autoComplete="off"
+ data-1p-ignore
+ data-lpignore="true"
+ data-form-type="other"
/>
<span className="invisible whitespace-pre text-xs block px-1 shrink-0 px-1">
{condition.operator || ' '}
@@ -291,6 +295,10 @@ export function FilterCondition({
aria-label={`Value for ${property.label}`}
data-testid={`filter-value-${property.name}`}
tabIndex={-1}
+ autoComplete="off"
+ data-1p-ignore
+ data-lpignore="true"
+ data-form-type="other"
/>
<span className="invisible whitespace-pre text-xs block px-1">{localValue || ' '}</span>
</div>
diff --git a/packages/ui-patterns/src/FilterBar/FilterGroup.tsx b/packages/ui-patterns/src/FilterBar/FilterGroup.tsx
index c256effe0c1..3341a4b44f6 100644
--- a/packages/ui-patterns/src/FilterBar/FilterGroup.tsx
+++ b/packages/ui-patterns/src/FilterBar/FilterGroup.tsx
@@ -196,6 +196,10 @@ export function FilterGroup({ group, path }: FilterGroupProps) {
}
disabled={isLoading}
data-testid="filter-bar-freeform-input"
+ autoComplete="off"
+ data-1p-ignore
+ data-lpignore="true"
+ data-form-type="other"
/>
) : (
<div className="relative inline-block">
@@ -210,6 +214,10 @@ export function FilterGroup({ group, path }: FilterGroupProps) {
className="h-full border-none bg-transparent py-0 text-xs focus:outline-none focus:ring-0 focus:shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 w-full absolute left-0 top-0 px-2"
placeholder="+ Add filter"
disabled={isLoading}
+ autoComplete="off"
+ data-1p-ignore
+ data-lpignore="true"
+ data-form-type="other"
/>
<span className="invisible whitespace-pre text-xs block">
{(isActive ? freeformText : localFreeformValue) || '+'}