fix: Refactor DataFilterComponent inputs (#4524)

* refactor: Update DataFilterComponent inputs to use StrInput instead of MessageInput

* refactor: Update DataFilterComponent inputs to use MessageTextInput instead of StrInput

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
anovazzi1 2024-11-12 23:05:09 -03:00 committed by GitHub
commit 8e0d6d55de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,7 @@
from typing import Any
from langflow.custom import Component
from langflow.io import DataInput, DropdownInput, MessageInput, Output
from langflow.io import DataInput, DropdownInput, MessageTextInput, Output
from langflow.schema import Data
@ -17,14 +17,19 @@ class DataFilterComponent(Component):
inputs = [
DataInput(name="input_data", display_name="Input Data", info="The list of data items to filter.", is_list=True),
MessageInput(
name="filter_key", display_name="Filter Key", info="The key to filter on (e.g., 'route').", value="route"
MessageTextInput(
name="filter_key",
display_name="Filter Key",
info="The key to filter on (e.g., 'route').",
value="route",
input_types=["Data"],
),
MessageInput(
MessageTextInput(
name="filter_value",
display_name="Filter Value",
info="The value to filter by (e.g., 'CMIP').",
value="CMIP",
input_types=["Data"],
),
DropdownInput(
name="operator",