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

[Flamegraph] Add properties to externally control the search text #2067

Closed
cauemarcondes opened this issue Jun 12, 2023 · 0 comments · Fixed by #2068
Closed

[Flamegraph] Add properties to externally control the search text #2067

cauemarcondes opened this issue Jun 12, 2023 · 0 comments · Fixed by #2068
Labels
enhancement New feature or request

Comments

@cauemarcondes
Copy link

cauemarcondes commented Jun 12, 2023

Is your feature request related to a problem? Please describe.
On Profiling, we'd like to filter the flamegraph when navigating from one page to another. That means I need to save in the URL the search value the user provides and pass it down to the flamegraph component. In case the user edits or clears out the search value I need to update its value in the URL too.

Describe the solution you'd like
The solution I propose is to expose two new properties: searchText and onSearchTextChange.

The first one searchText, is an optional string that will be used to pass down the searched value.
The second one onSearchTextChange, is an optional callback function with the new searched value, in case the user edited, or undefined, in case the user cleared the search.

<Flame
    id={id}
    columnarData={columnarData.viewModel}
    valueAccessor={(d: Datum) => d.value as number}
    valueFormatter={(value) => `${value}`}
    animation={{ duration: 100 }}
    searchText={searchText}
    onSearchTextChange={(newSearchText: string | undefined) => {
      //update url based on the new text
    }}
  />

Describe alternatives you've considered
N/A

Additional context
N/A

Kibana Cross Issues
https://github.com/elastic/prodfiler/issues/3126

@cauemarcondes cauemarcondes added the enhancement New feature or request label Jun 12, 2023
@cauemarcondes cauemarcondes changed the title [] [Flamegraph] Add properties to externally control the search text Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant