Graylog2 / Graylog2/graylog2-server

Select Component _formatInputValue return value

Open
#16,253 0 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

`graylog2-web-interface/src/components/common/Select/Select.tsx`
While using the Select Component, the **_formatInputValue** returns a string of comma separated values of all selected values when the availableOption becomes undefined. When binding, the list of selected values are not in required format.
## Expected Behavior

**_formatInputValue** should return a list of string(list of all the selected values)

## Current Behavior

Screenshot 2023-08-24 at 5 23 47 PM

## Possible Solution

modify the return value of _formatInputValue from `return availableOption ?? { [displayKey]: String(value), [valueKey]: value };
` to `return availableOption;`
## Steps to Reproduce (for bugs)

1. Select log types in any input configuration.
2. Click on next page and return back to the previous log type selection page.

## Context

## Your Environment

* Graylog Version:
* Java Version:
* OpenSearch Version:
* MongoDB Version:
* Operating System:
* Browser version:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.