Skip to content

Commit b70ea01

Browse files
authored
fix auto setter in nba (#321)
1 parent aa3f655 commit b70ea01

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

nba/nba/views/table.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ class State(rx.State):
1717
age: tuple[int, int] = (18, 50)
1818
salary: tuple[int, int] = (0, 25000000)
1919

20+
@rx.event
21+
def set_position(self, position: str) -> None:
22+
"""Set the position filter."""
23+
self.position = position
24+
25+
@rx.event
26+
def set_college(self, college: str) -> None:
27+
"""Set the college filter."""
28+
self.college = college
29+
2030
@rx.event
2131
def set_age(self, age: list[int | float]) -> None:
2232
"""Set the age filter."""

nba/rxconfig.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
import reflex as rx
22

3-
config = rx.Config(
4-
app_name="nba",
5-
tailwind=None,
6-
)
3+
config = rx.Config(app_name="nba")

0 commit comments

Comments
 (0)