Skip to content

Commit

Permalink
Merge pull request #297 from reflex-dev/fix-slider-implicit-type-anno…
Browse files Browse the repository at this point in the history
…tation

fix slider implicit type annotation
  • Loading branch information
adhami3310 authored Feb 4, 2025
2 parents 393197d + 184437c commit 2d4a662
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nba/nba/views/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ class State(rx.State):
age: tuple[int, int] = (18, 50)
salary: tuple[int, int] = (0, 25000000)

@rx.event
def set_age(self, age: list[int | float]) -> None:
"""Set the age filter."""
self.age = (int(age[0]), int(age[1]))

@rx.event
def set_salary(self, salary: list[int | float]) -> None:
"""Set the salary filter."""
self.salary = (int(salary[0]), int(salary[1]))

@rx.var
def df(self) -> pd.DataFrame:
"""The data."""
Expand Down

0 comments on commit 2d4a662

Please sign in to comment.