mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix: add allowClear to dropdown components for better UX
This commit is contained in:
parent
41b67b577b
commit
ec16dbe09b
7 changed files with 7 additions and 0 deletions
|
|
@ -103,6 +103,7 @@ const AgentSelector: React.FC<AgentSelectorProps> = ({
|
|||
value={selectedValues}
|
||||
loading={loading}
|
||||
className={className}
|
||||
allowClear
|
||||
showSearch
|
||||
style={{ width: "100%" }}
|
||||
disabled={disabled}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ const PassThroughRoutesSelector: React.FC<PassThroughRoutesSelectorProps> = ({
|
|||
value={value}
|
||||
loading={loading}
|
||||
className={className}
|
||||
allowClear
|
||||
options={passThroughRoutes.map((route) => ({
|
||||
label: route,
|
||||
value: route,
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ const MCPServerSelector: React.FC<MCPServerSelectorProps> = ({
|
|||
value={selectedValues}
|
||||
loading={loading}
|
||||
className={className}
|
||||
allowClear
|
||||
showSearch
|
||||
style={{ width: "100%" }}
|
||||
disabled={disabled}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue