Skip to content

Commit

Permalink
fix: 🐛 GxCellEditorSuggestion does not relocate when there is not eno…
Browse files Browse the repository at this point in the history
…ugh space.

closes #248
  • Loading branch information
hyyan committed Oct 25, 2022
1 parent cc3092a commit fc9e390
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
10 changes: 8 additions & 2 deletions client/dist/bbj-grid-widget.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/bbj-grid-widget.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client/dist/report.html

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion client/src/components/SuggestionEditor.js
Expand Up @@ -294,7 +294,7 @@ class SuggestionEditor {
* @param {HTMLElement} input
* @param {HTMLElement} inputRect
* @param {HTMLElement} container
* @param {String} maxHeight
* @param {Number} maxHeight
*/
// eslint-disable-next-line no-unused-vars
_onAutocompleteCustomize(input, inputRect, container, maxHeight) {
Expand All @@ -305,6 +305,15 @@ class SuggestionEditor {
if (this._params.height) {
container.style.height = `${this._params.height}px`
}

if (maxHeight < 100) {
container.style.top = ''
container.style.bottom =
window.innerHeight - inputRect.bottom + input.offsetHeight + 'px'
container.style.maxHeight = this._params.height
? `${this._params.height}px`
: '200px'
}
}

/**
Expand Down

0 comments on commit fc9e390

Please sign in to comment.