Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Removing hard timeout on edit while load selected values#12324

Merged
pamil merged 1 commit into
Sylius:1.8from
christopherhero:sylius_auto_complete_js
Mar 16, 2021
Merged

Removing hard timeout on edit while load selected values#12324
pamil merged 1 commit into
Sylius:1.8from
christopherhero:sylius_auto_complete_js

Conversation

@christopherhero
Copy link
Copy Markdown
Member

Q A
Branch? 1.8
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets
License MIT

In the js file, src/Sylius/Bundle/UiBundle/Resources/private/js/sylius-auto-complete.js is set timeout = 5 sec to wait for an async response from ajax autocomplete action.

possibly this was added because someone calculated that this time would be enough to load mutation observers. However, when we add more than one field of type ResourceAutocompleteChoiceType it loads with a long delay.
In this PR I removed timeout and add the refresh action on the dropdown with 'set selected' action after the response receiving.

@christopherhero christopherhero requested a review from a team as a code owner February 9, 2021 15:52
@Zales0123 Zales0123 added the Bug Confirmed bugs or bugfixes. label Feb 11, 2021
@pamil pamil merged commit 0d19667 into Sylius:1.8 Mar 16, 2021
@pamil
Copy link
Copy Markdown
Contributor

pamil commented Mar 16, 2021

Thank you, Krzysztof! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Confirmed bugs or bugfixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants