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

Disable update_columns for field_search #725

Open
JoaoFelipe opened this issue Jun 10, 2024 · 1 comment
Open

Disable update_columns for field_search #725

JoaoFelipe opened this issue Jun 10, 2024 · 1 comment

Comments

@JoaoFelipe
Copy link

Hi, I'm updating active_scaffold from version 3.6.20 to 3.7.4, but I'm having an unexpected behavior on field_search where it tries to use what I've configured for the new/edit forms.

I saw in the changelog that it is a new feature, but it is not clear to me how can I disable it to restore the previous behavior. Is there a way?

Thanks!

@scambra
Copy link
Member

scambra commented Jun 10, 2024

There is no setting right now, probably I should add a setting to field_search

You can override update_columns_options for now:

def update_columns_options(column, scope, options, force = false, url_params: {}, **)
  if url_params&.dig(:form_action) == :field_search
    options
  else
    super
  end
end

As url_params are passed only from field search you can use it to skip adding options for update_columns in field_search

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants