Skip to content

Commit

Permalink
update Dropdown component to ad-hoc import
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmermaid committed Sep 13, 2023
1 parent 2331aa5 commit 305b18e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pykoi/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from pydantic import BaseModel
from pyngrok import ngrok
from starlette.middleware.cors import CORSMiddleware
from pykoi.component.base import Dropdown
from pykoi.interactives.chatbot import Chatbot
from pykoi.telemetry.telemetry import Telemetry
from pykoi.telemetry.events import AppStartEvent, AppStopEvent
Expand Down Expand Up @@ -157,6 +156,9 @@ def add_component(self, component: Any):
Args:
component (Any): The component to be added.
"""
# TODO (Jojo): remove component Dropdown check
from pykoi.component.base import Dropdown

if component.data_source:
self.data_sources[component.id] = component.data_source
# set data_endpoint if it's a Dropdown component
Expand Down

0 comments on commit 305b18e

Please sign in to comment.