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

fix(datatable): search in key instead of value #16469

Conversation

stonebuzz
Copy link
Contributor

Search selected value (from filter list) by key instead of value when filter is a 'real' dropdown (key => val / 0 => 'foo')

dropdown is created like this

Array
  (
      [2] => 16780900
      [1] => stanislas-asus-desktop-2022-09-20-16-43-09
  )

and filter is created like this

Array
  (
      [agents_id] => Array
          (
              [0] => 2
          )
  )

Actually, only Item_Processes and Item_Environment use dropdown filter , but in each case key is equal to value

Array
  (
      [root] => root
      [systemd+] => systemd+
      [avahi] => avahi
      [message+] => message+
      [syslog] => syslog
      [rtkit] => rtkit
      [kernoops] => kernoops
      [postfix] => postfix
      [lp] => lp
      [colord] => colord
      [stanisl+] => stanisl+
      [mysql] => mysql
  )

Need by : pluginsGLPI/deploy#13

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #number

@stonebuzz stonebuzz self-assigned this Jan 30, 2024
@stonebuzz stonebuzz added the bug label Jan 30, 2024
@stonebuzz stonebuzz added this to the 10.1.0 milestone Jan 30, 2024
@stonebuzz stonebuzz closed this Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant