Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

BootstrapSelect - use global jQuery #335

Merged
merged 3 commits into from
May 22, 2018
Merged

BootstrapSelect - use global jQuery #335

merged 3 commits into from
May 22, 2018

Conversation

himdel
Copy link
Contributor

@himdel himdel commented May 21, 2018

to make sure selectpicker is there, even when global jQuery comes from bower
this means we now depend on global jquery + bootstrap-select, but works in master and gaprindashvili


Fixes

miq_debug.self-a72dc0b9f690f63b4688fbca3774709918c11fdfb7b5fc454690d11d007fc88b.js?body=1:29 TypeError: m(...).selectpicker is not a function
	at t.value (BootstrapSelect.js:29)
	at commitLifeCycles (react-dom.production.min.js:159)

ManageIQ/manageiq-ui-classic#3963: needed because otherwise, we need to backport all the changes to support moving ui-classic dependencies from bower to npm. If global jQuery comes from bower, any version of jQuery from npm will not see bootstrap-select.

(This PR could be gaprindashvili-only if so desired.)

@priley86
Copy link
Member

priley86 commented May 21, 2018

@himdel if you can rebase this w/ latest master and update yarn.lock and add $ to eslint globals, this PR is fine to merge...

just make this change to .eslintrc.js and tests will pass:

module.exports = {
  env: {
    browser: true,
    'jest/globals': true
  },
  globals: {
    __: true,
    sprintf: true,
    $: true
  },

to make sure selectpicker is there, even when global jQuery comes from bower
this means we now depend on global jquery + bootstrap-select, but works in master and gaprindashvili

---

Fixes

	miq_debug.self-a72dc0b9f690f63b4688fbca3774709918c11fdfb7b5fc454690d11d007fc88b.js?body=1:29 TypeError: m(...).selectpicker is not a function
		at t.value (BootstrapSelect.js:29)
		at commitLifeCycles (react-dom.production.min.js:159)
@himdel
Copy link
Contributor Author

himdel commented May 22, 2018

@priley86 Thanks, should be ready now :)

@priley86
Copy link
Member

thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants