We save filterset in a local state, because the FilterBar will send it down to us from cookies.
We then set each individual property from that filter set.
We set inputs to have a placeholder, as max buttons and max turns could not be set (null). Then, we only send those fields when they have a value provided by the user.
Charge Attack, Full Auto, and Auto Guard are not boolean values since the user can select (and the default should be) to show both on and off values. We swap to using a SelectTableField here to represent this difference.
We also added logic for Full Auto and Auto Guard fields since they are tied together in some cases (you can't show Auto Guard teams that have Full Auto disabled)
This sends the default filterset and the user's filterset to the filter modal.
The default filterset is used when resetting all filters. The users filterset is used so that it is populated with the user's values when they open the modal
We save filterset in a local state, because the FilterBar will send it down to us from cookies.
We then set each individual property from that filter set.
We set inputs to have a placeholder, as max buttons and max turns could not be set (null). Then, we only send those fields when they have a value provided by the user.
Charge Attack, Full Auto, and Auto Guard are not boolean values since the user can select (and the default should be) to show both on and off values. We swap to using a SelectTableField here to represent this difference.
We also added logic for Full Auto and Auto Guard fields since they are tied together in some cases (you can't show Auto Guard teams that have Full Auto disabled)
This sends the default filterset and the user's filterset to the filter modal.
The default filterset is used when resetting all filters. The users filterset is used so that it is populated with the user's values when they open the modal