Fix placeholder in monaco editor dissapear when value is set#217828
Merged
paulinashakirova merged 3 commits intoelastic:mainfrom Apr 17, 2025
Merged
Fix placeholder in monaco editor dissapear when value is set#217828paulinashakirova merged 3 commits intoelastic:mainfrom
paulinashakirova merged 3 commits intoelastic:mainfrom
Conversation
Dosant
reviewed
Apr 10, 2025
| // Mounts editor inside constructor | ||
| _placeholderWidget.current = new PlaceholderWidget(placeholder, euiTheme, _editor); | ||
| if (!placeholder || !_editor) return; | ||
| const model = _editor.getModel(); |
Contributor
There was a problem hiding this comment.
would be nice to extract his effect into a separate hook (fine if it is the same file)
usePlaceholder(placeholder, euiTheme, _editor)
also doesn't seem there is a need for _placeholderWidget.current and it could be just local variable
Contributor
Author
There was a problem hiding this comment.
Sounds great!
✅
Contributor
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
Contributor
💚 Build Succeeded
Metrics [docs]
|
Contributor
|
Starting backport for target branches: 9.0 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Apr 17, 2025
…#217828) ## Summary This PR fixes [[Bug] Setting text in the placeholder property does not clear when value is set with onChange action](elastic#149882) issue. (cherry picked from commit ea3dead)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Apr 17, 2025
…217828) (#218562) # Backport This will backport the following commits from `main` to `9.0`: - [Fix placeholder in monaco editor dissapear when value is set (#217828)](#217828) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Paulina Shakirova","email":"paulina.shakirova@elastic.co"},"sourceCommit":{"committedDate":"2025-04-17T12:49:05Z","message":"Fix placeholder in monaco editor dissapear when value is set (#217828)\n\n## Summary\n\nThis PR fixes [[Bug] Setting text in the placeholder property does not\nclear when value is set with onChange\naction](#149882) issue.","sha":"ea3dead452cc9d5db9626237bb60cd5c509b08a9","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:SharedUX","backport:prev-minor","v9.1.0"],"title":"Fix placeholder in monaco editor dissapear when value is set","number":217828,"url":"https://github.com/elastic/kibana/pull/217828","mergeCommit":{"message":"Fix placeholder in monaco editor dissapear when value is set (#217828)\n\n## Summary\n\nThis PR fixes [[Bug] Setting text in the placeholder property does not\nclear when value is set with onChange\naction](#149882) issue.","sha":"ea3dead452cc9d5db9626237bb60cd5c509b08a9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217828","number":217828,"mergeCommit":{"message":"Fix placeholder in monaco editor dissapear when value is set (#217828)\n\n## Summary\n\nThis PR fixes [[Bug] Setting text in the placeholder property does not\nclear when value is set with onChange\naction](#149882) issue.","sha":"ea3dead452cc9d5db9626237bb60cd5c509b08a9"}}]}] BACKPORT--> Co-authored-by: Paulina Shakirova <paulina.shakirova@elastic.co>
davismcphee
pushed a commit
to davismcphee/kibana
that referenced
this pull request
Apr 22, 2025
…#217828) ## Summary This PR fixes [[Bug] Setting text in the placeholder property does not clear when value is set with onChange action](elastic#149882) issue.
akowalska622
pushed a commit
to akowalska622/kibana
that referenced
this pull request
May 29, 2025
…#217828) ## Summary This PR fixes [[Bug] Setting text in the placeholder property does not clear when value is set with onChange action](elastic#149882) issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes [Bug] Setting text in the placeholder property does not clear when value is set with onChange action issue.