-
Couldn't load subscription status.
- Fork 2
Filter fields #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter fields #25
Conversation
src/sort_table.rs
Outdated
| pub sorter: Signal<Sorter<F>>, | ||
| pub field: F, | ||
| #[props(optional)] | ||
| pub filter: Option<Signal<Option<String>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why Option<Signal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it could be undefined, not sure if there is any other possibility to define that :-|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why its undefined? Empty hashmap should be fine?
1e3fafe to
c4babd9
Compare
d6bb579 to
582ae88
Compare
src/components/racers.rs
Outdated
| category: Option<Category>, | ||
| ) -> bool { | ||
| if let Some(cat) = category { | ||
| if !racer.categories.iter().any(|c| c == &cat) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use contains?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/sort_table.rs
Outdated
| pub sorter: Signal<Sorter<F>>, | ||
| pub field: F, | ||
| #[props(optional)] | ||
| pub filter: Option<Signal<Option<String>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why its undefined? Empty hashmap should be fine?
| th { role: "button", | ||
| span { | ||
| onclick: move |_| { | ||
| sorter.write().toggle(field); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is write() needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is :), at least signal is not updated without it :)
582ae88 to
d68891a
Compare
No description provided.