Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Browsing all 1539 articles
Browse latest View live
↧

JS Autocompleter does not produce a dropdown for suggestions

I am using the autocompleter (https://www.npmjs.com/package/autocompleter?activeTab=readme) JS library for an autocomplete module, and I am wondering if I am doing something wrong (although it looks...

View Article


Svelecte: dropdown options are blank when Svelte template is rendered

I am using Svelecte in an App. When I select multiple items and the associated template is rendered, the <select> options in the template become blank after each item is selected in Svelecte....

View Article


Image may be NSFW.
Clik here to view.

How to set up a svelte-carousel in modal pop-up

Sorry for the newbie question: I have a svelte website that was built for me, and I'm trying to tweak it to include a carousel in a modal pop-up. So my knowledge is limited and I am trying to get...

View Article

Image may be NSFW.
Clik here to view.

How do I set the pdf file name for iframe on the server side of my sveltekit...

I am trying to name a pdf file that I am getting from a shared file on the network. I read that you can set the file name by setting a 'Content-Disposition" header which I am doing. But this is not...

View Article

Svelte path to a static folder

I use Sveltekit and put some images in my static folder. Static > images > image1.png etc.Within source, src, I have a folder called lib and inside lib a folder called components and in there a...

View Article


Access cookies from another service

I'm trying to work with a clean and hexagonal architecture for my sveltekit frontend, connecting to an external API.When I want to load some data for a page, inside my load function I instantiate a...

View Article

Svelte component styles aren't overriding global styles

I am using scss in a Sveltekit project and have included my main global styles in my root layout file.<script lang="ts"> import 'css/app.scss'</scriptIn my global styles, I have the...

View Article

How can I dynamically import images stored in $lib within a component in Svelte?

I'm using an array of dummy data to test how I could display information from an api. In that data, I have a relative image path, for some images I've stored locally in $lib for simplicity in testing.I...

View Article


How should I build my store for complex object with methods?

My object is like:const inventory = { maxSlots: 24, content: [ {id: "item_01", quantity: 5, slotId: 0}, {id: "item_02", quantity: 2, slotId: 2}, {id: "item_03", quantity: 1, slotId: 6}, ]};I need...

View Article


Issue passing user text input from '' on page.svelte to page.server.ts?

I have been unable to pass user text input collected in a form on my page.svelte file to its corresponding page.server.ts. I feel like I've tried every method/ configuration in the docs and those used...

View Article

Svelte/SvelteKit: Persisting authentication state with Firebase Auth

I'm trying to build a Svelte/SvelteKit web app that requires authentication. For this I'm using Firebase Authentication.I can successfully create a new user and sign into the web app, but I cannot find...

View Article

Image may be NSFW.
Clik here to view.

Use multiple dynamic filters in supabase

So i am working on a filtering system in Supabase for a side project, it is my first time using a SQL DB (i was using Firebase before) and I was trying to create some queries like this: The user should...

View Article

Is it possible to access Svelte store from external js files?

I am wondering if i would be able to access my Svelte store values from a plain .js file.I am trying to write functions returning a dynamic value based on a store value, to import them in any...

View Article


Svelte tutorial vim keybinding for command mode

When setting, via the URL parameter vim=true, the vim keybindings in the svelte tutorial at learn.svelte.dev, I cannot find any indication of the keybinding to exit insert mode into command mode. Esc...

View Article

Image may be NSFW.
Clik here to view.

Best way to import SVG icons into a Svelte app

I have about 80 custom SVG icons that I'm importing into a Svelte front-end app. Building on https://github.com/sveltejs/template, it's built with Rollup and includes Typescript, Tailwind, and all the...

View Article


How to verify a component is visible?

I'm trying to write a test on my SvelteKit project with playwrite.Let's say I have this +page.svelte:<script> import A from './A.svelte' import B from './B.svelte'</script><A /> <B...

View Article

How to include JS from node_modules in Vite in production?

I have a svelte project that uses Vite for its build tooling. I want to import a js file from the sakura-js package and call it in my index.html file. It works locally when I use the script tag like...

View Article


How to target a component in svelte with css?

How would I do something like this:<style>Nested { color: blue;}</style><Nested />i.e. How do I apply a style to a component from its parent?

View Article

Using pusher to trigger function in sveltekit but it can't read properties

I have this code: function SpinWheel() { let min = 10; let max = 30; let degree = Math.floor(Math.random() * (max - min) * 1000); slice.style.transition = 'all 10s ease-out'; slice.style.transform =...

View Article

Facebook Instant Games: Must Not Call Private APIs

Upon uploading to Facebook Instant Games we got the error "Must Not Call Private APIs: Games must use the Instant Games SDK properly and should not call private methods directly."We are using the same...

View Article
Browsing all 1539 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>