Skip to content
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

change Columns field in list filters to also allow for deselecting columns #735

Closed
sennierer opened this issue Mar 20, 2024 · 1 comment · Fixed by #1010
Closed

change Columns field in list filters to also allow for deselecting columns #735

sennierer opened this issue Mar 20, 2024 · 1 comment · Fixed by #1010
Assignees

Comments

@sennierer
Copy link
Collaborator

currently the multiselect form field shows all attributes of a model, but those that are already shown in the default table are not selected and can thus not be removed from the table.
All possible columns should be in the form and those shown should be selected, if they are unselected they should be removed from the table.

@sennierer sennierer self-assigned this Mar 28, 2024
sennierer added a commit that referenced this issue Mar 28, 2024
sennierer added a commit that referenced this issue Mar 28, 2024
please note: this is not perfect as the `get_table_class` function
gets called twice. Its needed for filtering the kwargs of the table
but is not yet available when `get_table_kwargs` gets called.

resolves #735
@sennierer
Copy link
Collaborator Author

has to work also for annotated fields (in the qs), not only fields of the class

sennierer added a commit that referenced this issue Jun 25, 2024
please note: this is not perfect as the `get_table_class` function
gets called twice. Its needed for filtering the kwargs of the table
but is not yet available when `get_table_kwargs` gets called.

resolves #735
b1rger added a commit that referenced this issue Jun 27, 2024
The column selector now gets initialized with the correct initial values
and it can now also cope with additional choices, like annotations and
the default table fields.
The `get_table_kwargs` method was updated to be able to show all the
selected columns.

Co-authored-by: Matthias Schlögl <matthias.schloegl@oeaw.ac.at>

Closes: #735
b1rger added a commit that referenced this issue Jun 27, 2024
The column selector now gets initialized with the correct initial values
and it can now also cope with additional choices, like annotations and
the default table fields.
The `get_table_kwargs` method was updated to be able to show all the
selected columns.

Co-authored-by: Matthias Schlögl <matthias.schloegl@oeaw.ac.at>

Closes: #735
b1rger added a commit that referenced this issue Jun 27, 2024
The column selector now gets initialized with the correct initial values
and it can now also cope with additional choices, like annotations and
the default table fields.
The `get_table_kwargs` method was updated to be able to show all the
selected columns.

Co-authored-by: Matthias Schlögl <matthias.schloegl@oeaw.ac.at>

Closes: #735
b1rger added a commit that referenced this issue Jun 28, 2024
The column selector now gets initialized with the correct initial values
and it can now also cope with additional choices, like annotations and
the default table fields.
The `get_table_kwargs` method was updated to be able to show all the
selected columns.

Co-authored-by: Matthias Schlögl <matthias.schloegl@oeaw.ac.at>

Closes: #735
@b1rger b1rger closed this as completed in eaef405 Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment