Semantic-UI-Meteor icon indicating copy to clipboard operation
Semantic-UI-Meteor copied to clipboard

Not compatible with Meteor 1.7

Open mishantidev opened this issue 7 years ago • 5 comments

Getting this error on Meteor 1.7.0.3. Downgrading to Meteor 1.6.1.3 solves the problem.

Template.languageSelector.onRendered(function() {
	this.$('.ui.dropdown').dropdown({on: 'hover'})
})

TypeError: this.$(...).dropdown is not a function at Blaze.TemplateInstance. (forms.js:12) at blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3398 at Function.Template._withTemplateInstanceFunc (blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3744) at fireCallbacks (blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3394) at Blaze.View. (blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3487) at blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:1845 at Object.Blaze._withCurrentView (blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:2271) at blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:1844 at Object.Tracker._runFlush (tracker.js:511) at onGlobalMessage (meteor.js?hash=c8108d734cc548d91539b054e14b613d0c4512cc:466)

mishantidev avatar Jun 27 '18 07:06 mishantidev

confirmed for radio checkboxes as well:

Template.CreateForm.onRendered(()=>{ this.$('.ui.radio.checkbox').checkbox(); });

Exception from Tracker afterFlush function: meteor.js:1010:11 TypeError: this.$(...).checkbox is not a function meteor.js:1010:11

tvogt avatar Jul 11 '18 06:07 tvogt

I fixed this by including the following for dropdown:

import '../../client/lib/semantic-ui/definitions/modules/dropdown'; import '../../client/lib/semantic-ui/definitions/modules/transition';

rdsimp avatar Jul 18 '18 22:07 rdsimp

@anjunatic are you still using eager file loading outside of imports folder or switched to package.json entry point options?

vbelolapotkov avatar Sep 27 '18 14:09 vbelolapotkov

@vbelolapotkov I use ES6 modules & imports folder for my own files, but semantic UI is located in client folder

mishantidev avatar Sep 27 '18 22:09 mishantidev

@anjunatic if you start a meteor 1.7 project from scratch it will create meteor section in you package.json which disables default loading order from your client folder => you have to import your client folder manually. If you want to stick with the old loading behavior just remove meteor section from your package.json and it will load semantic ui.

Anyways, as this package is falling behind the original npm package updates I switched from atmosphere package to npm in the following way:

  1. build js, css, assets from npm package with gulp (in a separate directory)
  2. add compiled files via local package

vbelolapotkov avatar Sep 28 '18 13:09 vbelolapotkov