Force dropdown position#6139
Open
nzkozar wants to merge 10 commits into
Open
Conversation
Enable forcing dropdown position either above or below with constructor option 'forcePosition' that takes either value 'below' or 'above'
Changed forcePosition to forceDropdownPosition and repositioned the if clause to skip automatic position checks if forceDropdownPosition option is set.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
dinarde
added a commit
to projeto-siga/siga
that referenced
this pull request
Apr 4, 2022
Em testes, só o aumento da modal não foi o suficiente para que o componente Select2 exercesse os cálculos de redimensionamento de forma correta. Inclusive o problema já ocorre em produção com resoluções achatadas. Para contornar o problema, foi implementado um Pull Request do Projeto Select2 que visa resolver esse problema, onde na criação do Select é dito qual a orientação do dropdown: select2/select2#6139 Para usar o componente corrigido basta adicionar o script após o Select2: <script type="text/javascript" src="/api/public/proxy?url=https%3A%2F%2Fgithub.com%2Fsiga%2Fjavascript%2Fselect2%2Fselect2.min.js"></script> <script type="text/javascript" src="/api/public/proxy?url=https%3A%2F%2Fgithub.com%2Fsiga%2Fjavascript%2Fselect2%2Fi18n%2Fpt-BR.js"></script> <script type="text/javascript" src="/api/public/proxy?url=https%3A%2F%2Fgithub.com%2Fsiga%2Fjavascript%2Fsiga.select2.js"></script> <script type="text/javascript" src="/api/public/proxy?url=https%3A%2F%2Fgithub.com%2Fsiga%2Fjavascript%2Fselect2%2Fselect2-dropdownPosition.js"></script> O Select sempre abrirá para baixo nas telas Modais implementadas: Seleção de Pessoa , Cargo , Lotação e Função de Confiança e segue o Scroll lateral para percorrer a lista normalmente:
|
Congratulations. This solved my problem with using Select 2 with Modal Bootstrap |
|
This is a must have feature. Please consider merging it into master. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Please do not close, this is a valid option. |
dogawaf
suggested changes
May 17, 2023
Fix code style Co-authored-by: Rémy DANIEL <dogawaf@gmail.com>
Fix code style Co-authored-by: Rémy DANIEL <dogawaf@gmail.com>
Fix code style Co-authored-by: Rémy DANIEL <dogawaf@gmail.com>
Fix code style Co-authored-by: Rémy DANIEL <dogawaf@gmail.com>
Fix code style Co-authored-by: Rémy DANIEL <dogawaf@gmail.com>
Fix code style Co-authored-by: Rémy DANIEL <dogawaf@gmail.com>
Author
@dogawaf I made the changes you suggested. Let me know if anything else is needed. |
|
This PR requires attention. |
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.
This pull request includes a
The following changes were made
If this is related to an existing ticket, include a link to it as well.
This functionality was discussed in issue #3121
It was previously proposed in PR #4618
This PR improves upon the above linked PR #4618, so that it:
forceDropdownPosition, as it is more descriptive of what it doesautodefault value for the proposed configuration optionFeedback is welcome, as well as pointers if anything else needs to be done to make this change ready for merge to
masterbranch.