mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 13:52:34 +08:00
fix: add overflow to table dropdown selection, removed Multiple selector from Structured Output (#8027)
* Fixed not being able to edit options because of overflow in Table Node Cell Editor * Updated structured output to not have Multiple selection since it's enabled by default
This commit is contained in:
@ -92,20 +92,10 @@ class StructuredOutputComponent(Component):
|
||||
"display_name": "Type",
|
||||
"type": "str",
|
||||
"edit_mode": EditMode.INLINE,
|
||||
"description": (
|
||||
"Indicate the data type of the output field (e.g., str, int, float, bool, list, dict)."
|
||||
),
|
||||
"options": ["str", "int", "float", "bool", "list", "dict"],
|
||||
"description": ("Indicate the data type of the output field (e.g., str, int, float, bool, dict)."),
|
||||
"options": ["str", "int", "float", "bool", "dict"],
|
||||
"default": "str",
|
||||
},
|
||||
{
|
||||
"name": "multiple",
|
||||
"display_name": "Multiple",
|
||||
"type": "boolean",
|
||||
"description": "Set to True if this output field should be a list of the specified type.",
|
||||
"default": "False",
|
||||
"edit_mode": EditMode.INLINE,
|
||||
},
|
||||
],
|
||||
value=[
|
||||
{
|
||||
@ -120,7 +110,7 @@ class StructuredOutputComponent(Component):
|
||||
name="multiple",
|
||||
advanced=True,
|
||||
display_name="Generate Multiple",
|
||||
info="[Deplrecated] Always set to True",
|
||||
info="[Deprecated] Always set to True",
|
||||
value=True,
|
||||
),
|
||||
]
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -6,9 +6,13 @@ export default function TableDropdownCellEditor({
|
||||
values,
|
||||
onValueChange,
|
||||
colDef,
|
||||
eGridCell,
|
||||
}: CustomCellEditorProps & { values: string[] }) {
|
||||
return (
|
||||
<div className="flex h-full items-center px-2">
|
||||
<div
|
||||
style={{ width: eGridCell.clientWidth }}
|
||||
className="flex h-full items-center px-2"
|
||||
>
|
||||
<InputComponent
|
||||
setSelectedOption={(value) => onValueChange(value)}
|
||||
value={value}
|
||||
|
||||
@ -589,7 +589,7 @@ export function FormatColumns(columns: ColumnField[]): ColDef<any>[] {
|
||||
) {
|
||||
if (col.options && col.formatter === FormatterType.text) {
|
||||
newCol.cellEditor = TableDropdownCellEditor;
|
||||
newCol.cellEditorPopup = false;
|
||||
newCol.cellEditorPopup = true;
|
||||
newCol.cellEditorParams = {
|
||||
values: col.options,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user