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 for issues with resetting saved search #2064

Merged
merged 2 commits into from
Dec 4, 2014

Conversation

lukasolson
Copy link
Member

Prior to this fix, when you would open a saved search, then add some columns (without saving), then click on the reset button next to the saved search title, the columns wouldn't reset properly (you'd still see the columns you added in the field list on the left), and everything would get really out of whack.

This fix invokes setFields each time you click the reset button, which properly resets the added fields and sets their display property (which wasn't happening prior to this change).

Closes #2012.

@spalger
Copy link
Contributor

spalger commented Dec 3, 2014

Ideally, this listener would be having this effect. If it's not working then I think we should be fixing it here.

On line 419 $state.reset() causes the columns in state to be reset to their default values, which should cause this listener to be fired and the columns to be updated properly. If the listener isn't working, I'd rather it be fixed there.

@spalger spalger removed the review label Dec 3, 2014
@spalger spalger assigned lukasolson and unassigned spalger Dec 3, 2014
@lukasolson lukasolson assigned spalger and unassigned lukasolson Dec 4, 2014
@spalger
Copy link
Contributor

spalger commented Dec 4, 2014

LGTM

spalger pushed a commit that referenced this pull request Dec 4, 2014
Fix for issues with resetting saved search
@spalger spalger merged commit aa9bd58 into elastic:master Dec 4, 2014
@spalger
Copy link
Contributor

spalger commented Dec 4, 2014

I dig "reset_with_changes", good call!

@lukasolson lukasolson deleted the issue-2012 branch February 11, 2016 18:22
nickofthyme added a commit that referenced this pull request Jun 26, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
[`57.0.1` ->
`58.2.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/57.0.1/58.2.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/compatibility-slim/57.0.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/confidence-slim/57.0.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts</summary>

#
[58.2.0](elastic/elastic-charts@v58.1.0...v58.2.0)
(2023-06-23)


### Bug Fixes

* `Chart` component `children` type
([#2071](elastic/elastic-charts#2071))
([525c782](elastic/elastic-charts@525c782))
* **deps:** update dependency @elastic/eui to v82
([#2074](elastic/elastic-charts#2074))
([69a655f](elastic/elastic-charts@69a655f))


### Features

* **flame:** expose search field text and search text change listener
([#2068](elastic/elastic-charts#2068))
([c339947](elastic/elastic-charts@c339947))
* support native chart title and description
([#2002](elastic/elastic-charts#2002))
([341a990](elastic/elastic-charts@341a990))

#
[58.1.0](elastic/elastic-charts@v58.0.0...v58.1.0)
(2023-06-08)


### Features

* **flame:** expose search control
([#2064](elastic/elastic-charts#2064))
([011b56b](elastic/elastic-charts@011b56b))

#
[58.0.0](elastic/elastic-charts@v57.0.1...v58.0.0)
(2023-06-06)


### Bug Fixes

* **axis:** reduce number of y axis ticks on linear scale
([#2005](elastic/elastic-charts#2005))
([0ef828b](elastic/elastic-charts@0ef828b))
* **deps:** update dependency @elastic/eui to v81
([#2052](elastic/elastic-charts#2052))
([4c55e01](elastic/elastic-charts@4c55e01))


### BREAKING CHANGES

* **axis:** the default number of desired ticks in the Y-Axis was
changed from `10` to `5`

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nickofthyme <nicholas.partridge@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
kibanamachine pushed a commit that referenced this pull request Jun 26, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
[`57.0.1` ->
`58.2.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/57.0.1/58.2.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/compatibility-slim/57.0.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/confidence-slim/57.0.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts</summary>

#
[58.2.0](elastic/elastic-charts@v58.1.0...v58.2.0)
(2023-06-23)

### Bug Fixes

* `Chart` component `children` type
([#2071](elastic/elastic-charts#2071))
([525c782](elastic/elastic-charts@525c782))
* **deps:** update dependency @elastic/eui to v82
([#2074](elastic/elastic-charts#2074))
([69a655f](elastic/elastic-charts@69a655f))

### Features

* **flame:** expose search field text and search text change listener
([#2068](elastic/elastic-charts#2068))
([c339947](elastic/elastic-charts@c339947))
* support native chart title and description
([#2002](elastic/elastic-charts#2002))
([341a990](elastic/elastic-charts@341a990))

#
[58.1.0](elastic/elastic-charts@v58.0.0...v58.1.0)
(2023-06-08)

### Features

* **flame:** expose search control
([#2064](elastic/elastic-charts#2064))
([011b56b](elastic/elastic-charts@011b56b))

#
[58.0.0](elastic/elastic-charts@v57.0.1...v58.0.0)
(2023-06-06)

### Bug Fixes

* **axis:** reduce number of y axis ticks on linear scale
([#2005](elastic/elastic-charts#2005))
([0ef828b](elastic/elastic-charts@0ef828b))
* **deps:** update dependency @elastic/eui to v81
([#2052](elastic/elastic-charts#2052))
([4c55e01](elastic/elastic-charts@4c55e01))

### BREAKING CHANGES

* **axis:** the default number of desired ticks in the Y-Axis was
changed from `10` to `5`

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nickofthyme <nicholas.partridge@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
(cherry picked from commit b2c6c71)
kibanamachine added a commit that referenced this pull request Jun 26, 2023
)

# Backport

This will backport the following commits from `main` to `8.9`:
- [Update dependency @elastic/charts to v58 (main)
(#159082)](#159082)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"renovate[bot]","email":"29139614+renovate[bot]@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-06-26T18:41:49Z","message":"Update
dependency @elastic/charts to v58 (main)
(#159082)\n\n[![Mend\r\nRenovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)\r\n\r\nThis
PR contains the following updates:\r\n\r\n| Package | Change | Age |
Adoption | Passing | Confidence |\r\n|---|---|---|---|---|---|\r\n|
[@elastic/charts](https://togithub.com/elastic/elastic-charts)
|\r\n[`57.0.1`
->\r\n`58.2.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/57.0.1/58.2.0)\r\n|\r\n[![age](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)\r\n|\r\n[![adoption](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)\r\n|\r\n[![passing](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/compatibility-slim/57.0.1)](https://docs.renovatebot.com/merge-confidence/)\r\n|\r\n[![confidence](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/confidence-slim/57.0.1)](https://docs.renovatebot.com/merge-confidence/)\r\n|\r\n\r\n---\r\n\r\n###
Release
Notes\r\n\r\n<details>\r\n<summary>elastic/elastic-charts</summary>\r\n\r\n#\r\n[58.2.0](https://github.com/elastic/elastic-charts/compare/v58.1.0...v58.2.0)\r\n(2023-06-23)\r\n\r\n\r\n###
Bug Fixes\r\n\r\n* `Chart` component `children`
type\r\n([#2071](https://github.com/elastic/elastic-charts/issues/2071))\r\n([525c782](https://github.com/elastic/elastic-charts/commit/525c782829a37e465b03d5aae7a0d697f00bd431))\r\n*
**deps:** update dependency @elastic/eui to
v82\r\n([#2074](https://github.com/elastic/elastic-charts/issues/2074))\r\n([69a655f](https://github.com/elastic/elastic-charts/commit/69a655f0dac2975ab42b48a48cc19693eaff1021))\r\n\r\n\r\n###
Features\r\n\r\n* **flame:** expose search field text and search text
change
listener\r\n([#2068](https://github.com/elastic/elastic-charts/issues/2068))\r\n([c339947](https://github.com/elastic/elastic-charts/commit/c339947c3963b8ad8124203435f410b34b93cc1e))\r\n*
support native chart title and
description\r\n([#2002](https://github.com/elastic/elastic-charts/issues/2002))\r\n([341a990](https://github.com/elastic/elastic-charts/commit/341a990c5d1154f36927a91321e4d0c39b44a4be))\r\n\r\n#\r\n[58.1.0](https://github.com/elastic/elastic-charts/compare/v58.0.0...v58.1.0)\r\n(2023-06-08)\r\n\r\n\r\n###
Features\r\n\r\n* **flame:** expose search
control\r\n([#2064](https://github.com/elastic/elastic-charts/issues/2064))\r\n([011b56b](https://github.com/elastic/elastic-charts/commit/011b56b3f51e2aa1fea8410b4f24e69403635933))\r\n\r\n#\r\n[58.0.0](https://github.com/elastic/elastic-charts/compare/v57.0.1...v58.0.0)\r\n(2023-06-06)\r\n\r\n\r\n###
Bug Fixes\r\n\r\n* **axis:** reduce number of y axis ticks on linear
scale\r\n([#2005](https://github.com/elastic/elastic-charts/issues/2005))\r\n([0ef828b](https://github.com/elastic/elastic-charts/commit/0ef828b535f69d3a47fa38febd5dd1f5b88a6ce8))\r\n*
**deps:** update dependency @elastic/eui to
v81\r\n([#2052](https://github.com/elastic/elastic-charts/issues/2052))\r\n([4c55e01](https://github.com/elastic/elastic-charts/commit/4c55e0119e6d0def4340a620899b7ee0e0012b02))\r\n\r\n\r\n###
BREAKING CHANGES\r\n\r\n* **axis:** the default number of desired ticks
in the Y-Axis was\r\nchanged from `10` to
`5`\r\n\r\n</details>\r\n\r\n---\r\n\r\n### Configuration\r\n\r\n📅
**Schedule**: Branch creation - At any time (no schedule
defined),\r\nAutomerge - At any time (no schedule defined).\r\n\r\n🚦
**Automerge**: Disabled by config. Please merge this manually once
you\r\nare satisfied.\r\n\r\n♻ **Rebasing**: Whenever PR becomes
conflicted, or you tick the\r\nrebase/retry checkbox.\r\n\r\n🔕
**Ignore**: Close this PR and you won't be reminded about this
update\r\nagain.\r\n\r\n---\r\n\r\n- [ ] <!-- rebase-check -->If you
want to rebase/retry this PR, check\r\nthis box\r\n\r\n---\r\n\r\nThis
PR has been generated by
[Mend\r\nRenovate](https://www.mend.io/free-developer-tools/renovate/).
View\r\nrepository job
log\r\n[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).\r\n\r\n<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->\r\n\r\n---------\r\n\r\nCo-authored-by:
renovate[bot]
<29139614+renovate[bot]@users.noreply.github.com>\r\nCo-authored-by:
nickofthyme <nicholas.partridge@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Nick Partridge <nick.ryan.partridge@gmail.com>\r\nCo-authored-by: Marco
Vettorello
<marco.vettorello@elastic.co>","sha":"b2c6c71a8db689b5dbf7ee1017071732e09afc18","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:APM","Team:Visualizations","Team:uptime","release_note:skip","auto-backport","apm:cypress-record","v8.9.0"],"number":159082,"url":"https://github.com/elastic/kibana/pull/159082","mergeCommit":{"message":"Update
dependency @elastic/charts to v58 (main)
(#159082)\n\n[![Mend\r\nRenovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)\r\n\r\nThis
PR contains the following updates:\r\n\r\n| Package | Change | Age |
Adoption | Passing | Confidence |\r\n|---|---|---|---|---|---|\r\n|
[@elastic/charts](https://togithub.com/elastic/elastic-charts)
|\r\n[`57.0.1`
->\r\n`58.2.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/57.0.1/58.2.0)\r\n|\r\n[![age](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)\r\n|\r\n[![adoption](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)\r\n|\r\n[![passing](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/compatibility-slim/57.0.1)](https://docs.renovatebot.com/merge-confidence/)\r\n|\r\n[![confidence](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/58.2.0/confidence-slim/57.0.1)](https://docs.renovatebot.com/merge-confidence/)\r\n|\r\n\r\n---\r\n\r\n###
Release
Notes\r\n\r\n<details>\r\n<summary>elastic/elastic-charts</summary>\r\n\r\n#\r\n[58.2.0](https://github.com/elastic/elastic-charts/compare/v58.1.0...v58.2.0)\r\n(2023-06-23)\r\n\r\n\r\n###
Bug Fixes\r\n\r\n* `Chart` component `children`
type\r\n([#2071](https://github.com/elastic/elastic-charts/issues/2071))\r\n([525c782](https://github.com/elastic/elastic-charts/commit/525c782829a37e465b03d5aae7a0d697f00bd431))\r\n*
**deps:** update dependency @elastic/eui to
v82\r\n([#2074](https://github.com/elastic/elastic-charts/issues/2074))\r\n([69a655f](https://github.com/elastic/elastic-charts/commit/69a655f0dac2975ab42b48a48cc19693eaff1021))\r\n\r\n\r\n###
Features\r\n\r\n* **flame:** expose search field text and search text
change
listener\r\n([#2068](https://github.com/elastic/elastic-charts/issues/2068))\r\n([c339947](https://github.com/elastic/elastic-charts/commit/c339947c3963b8ad8124203435f410b34b93cc1e))\r\n*
support native chart title and
description\r\n([#2002](https://github.com/elastic/elastic-charts/issues/2002))\r\n([341a990](https://github.com/elastic/elastic-charts/commit/341a990c5d1154f36927a91321e4d0c39b44a4be))\r\n\r\n#\r\n[58.1.0](https://github.com/elastic/elastic-charts/compare/v58.0.0...v58.1.0)\r\n(2023-06-08)\r\n\r\n\r\n###
Features\r\n\r\n* **flame:** expose search
control\r\n([#2064](https://github.com/elastic/elastic-charts/issues/2064))\r\n([011b56b](https://github.com/elastic/elastic-charts/commit/011b56b3f51e2aa1fea8410b4f24e69403635933))\r\n\r\n#\r\n[58.0.0](https://github.com/elastic/elastic-charts/compare/v57.0.1...v58.0.0)\r\n(2023-06-06)\r\n\r\n\r\n###
Bug Fixes\r\n\r\n* **axis:** reduce number of y axis ticks on linear
scale\r\n([#2005](https://github.com/elastic/elastic-charts/issues/2005))\r\n([0ef828b](https://github.com/elastic/elastic-charts/commit/0ef828b535f69d3a47fa38febd5dd1f5b88a6ce8))\r\n*
**deps:** update dependency @elastic/eui to
v81\r\n([#2052](https://github.com/elastic/elastic-charts/issues/2052))\r\n([4c55e01](https://github.com/elastic/elastic-charts/commit/4c55e0119e6d0def4340a620899b7ee0e0012b02))\r\n\r\n\r\n###
BREAKING CHANGES\r\n\r\n* **axis:** the default number of desired ticks
in the Y-Axis was\r\nchanged from `10` to
`5`\r\n\r\n</details>\r\n\r\n---\r\n\r\n### Configuration\r\n\r\n📅
**Schedule**: Branch creation - At any time (no schedule
defined),\r\nAutomerge - At any time (no schedule defined).\r\n\r\n🚦
**Automerge**: Disabled by config. Please merge this manually once
you\r\nare satisfied.\r\n\r\n♻ **Rebasing**: Whenever PR becomes
conflicted, or you tick the\r\nrebase/retry checkbox.\r\n\r\n🔕
**Ignore**: Close this PR and you won't be reminded about this
update\r\nagain.\r\n\r\n---\r\n\r\n- [ ] <!-- rebase-check -->If you
want to rebase/retry this PR, check\r\nthis box\r\n\r\n---\r\n\r\nThis
PR has been generated by
[Mend\r\nRenovate](https://www.mend.io/free-developer-tools/renovate/).
View\r\nrepository job
log\r\n[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).\r\n\r\n<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->\r\n\r\n---------\r\n\r\nCo-authored-by:
renovate[bot]
<29139614+renovate[bot]@users.noreply.github.com>\r\nCo-authored-by:
nickofthyme <nicholas.partridge@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Nick Partridge <nick.ryan.partridge@gmail.com>\r\nCo-authored-by: Marco
Vettorello
<marco.vettorello@elastic.co>","sha":"b2c6c71a8db689b5dbf7ee1017071732e09afc18"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

[Discover] - Loss of selected fields on refresh
2 participants