fix: add allowClear to dropdown components for better UX

This commit is contained in:
Jack Temple 2026-01-07 14:16:29 -07:00
parent 41b67b577b
commit ec16dbe09b
7 changed files with 7 additions and 0 deletions

View file

@ -103,6 +103,7 @@ const AgentSelector: React.FC<AgentSelectorProps> = ({
value={selectedValues}
loading={loading}
className={className}
allowClear
showSearch
style={{ width: "100%" }}
disabled={disabled}

View file

@ -53,6 +53,7 @@ const PassThroughRoutesSelector: React.FC<PassThroughRoutesSelectorProps> = ({
value={value}
loading={loading}
className={className}
allowClear
options={passThroughRoutes.map((route) => ({
label: route,
value: route,

View file

@ -23,6 +23,7 @@ const BudgetDurationDropdown: React.FC<BudgetDurationDropdownProps> = ({
onChange={onChange}
className={className}
placeholder="n/a"
allowClear
>
<Option value="24h">daily</Option>
<Option value="7d">weekly</Option>

View file

@ -18,6 +18,7 @@ const TeamDropdown: React.FC<TeamDropdownProps> = ({ teams, value, onChange, dis
value={value}
onChange={onChange}
disabled={disabled}
allowClear
filterOption={(input, option) => {
if (!option) return false;
// Get team data from the option key

View file

@ -52,6 +52,7 @@ const GuardrailSelector: React.FC<GuardrailSelectorProps> = ({ onChange, value,
value={value}
loading={loading}
className={className}
allowClear
options={guardrails.map((guardrail) => {
console.log("Mapping guardrail:", guardrail);
return {

View file

@ -87,6 +87,7 @@ const MCPServerSelector: React.FC<MCPServerSelectorProps> = ({
value={selectedValues}
loading={loading}
className={className}
allowClear
showSearch
style={{ width: "100%" }}
disabled={disabled}

View file

@ -51,6 +51,7 @@ const VectorStoreSelector: React.FC<VectorStoreSelectorProps> = ({
value={value}
loading={loading}
className={className}
allowClear
options={vectorStores.map((store) => ({
label: `${store.vector_store_name || store.vector_store_id} (${store.vector_store_id})`,
value: store.vector_store_id,