Open notYou263 opened 2 years ago
@notYou263 I was working on a fix, I will try to finish it and push the changes
I decided to move jquery loading to a component that has to be mounted on the top level of the app, this way we don't have to wait for jquery loading each time we want to initialize a component depending on it
I also removed the svelte await block that cause flickering
Sounds great.
A temporarily solution is, disabling ssr in hook.js file
https://github.com/sveltejs/kit/pull/2804#issuecomment-1021446738
However I hope for a fix anytime soon as above method is not suitable
As soon as I add a dropdown, following error shows up in browser console
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'isFunction')
at transition.min?import:11:48
at transition.min?import:11:13280
Using a fresh installed svelte-kit skeleton, install svantic and jquery (as it isnt anymore) and my index.svelte file
<script>
// import modules
import { Button, Dropdown, initDropdown, Icon, Svantic } from 'svantic';
// call this function if you want to use Module.SubModule syntax, ex: Dropdown.Item
initDropdown()
</script>
<Svantic>
<Button> A button </Button>
<Dropdown
onMount={(domElem) => {}}
settings={{}}
selection >
<Icon name="caret down" />
<Dropdown.Text>Select language</Dropdown.Text>
<Dropdown.Menu>
<Dropdown.Item>English</Dropdown.Item>
<Dropdown.Item>Arabic</Dropdown.Item>
<Dropdown.Item>Spanish</Dropdown.Item>
<Dropdown.Item>German</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
</Svantic>
And btw, there are some missing exports, MenuItem, initMenu, initTable and other table child components
Hi,
I created a new svelte-kit app, added svantic and got some errors to deal with because of fomantics jquery depency as well as some design problems. I would like to discuss a possible solution for this problem.
Here is what I did to get it working.
First I had to add a typeof window check at src/modules/utils/loader.js
Then I made some changes on the components.
For example, src/modules/dropdown/dropdown.svelte