262
questions
0
votes
0
answers
39
views
How to efficiently toggle components using Mithril.js
I have a list of some data. I want to display and edit that data.
My Home component iterates over this data and display using Item component it Each row has data and edit button. After clicking on ...
0
votes
1
answer
48
views
Mithril app crashing when open multiple tabs/popups
I'm working on a project using Mithril, and on a table whenever I click an element it opens a popup Component which is basically composed by 4 divs nested into each other and the deepest one is ...
1
vote
0
answers
52
views
Certain Formatting Options No Longer Work, mithril js, quill js, quillRenderer, sass
Our company's site utilizes typescript, Mithril js, Quill JS, (also quill renderer), and sass. Certain styling options that worked before changing to the quill renderer have stopped working. The ...
0
votes
1
answer
88
views
Mithriljs add onkeydown event when component is created
I am trying to initialize an onkeydown event when a component is created:
var KeyboardComponent = {
parse: function(e){
console.log("pressed: " + e.key);
},
view: ...
1
vote
0
answers
287
views
Mithril js framework, enable hot reload?
I am using Mithril javascript framework with Vite bundler. Application is really complex and during debugging, for every change (even a small HTML edit), it takes me like 10-20 seconds to get to the ...
0
votes
1
answer
268
views
Mithril JS input checkbox events and element refresh
Working on a SPA with Mithril.js (love it!), but having a problem with input checkboxes not behaving correctly when I assign an "onchange" listener to them.
var Widget = {
view: function(...
0
votes
1
answer
91
views
using return of async function in view()
I previously had a simple component that looked something like this, but previously the getIsLoggedIn method was synchronous. We recently had to change that method to async, so I tried adding the ...
1
vote
1
answer
712
views
Google Publisher Tag Reward Ad reloads Mithril SPA unexpectedly
When I run this code in my localhost server and I click the Show Ad button in the #!/reward page, the reward ad shows but sends me back to the #!/ page. However, in this online code editor this SPA (...
0
votes
2
answers
223
views
Typescript requires mithril import that breaks in javascript
Currently translating my javascript app to typescript. Previously I was just using m() and Vnode without any imports, but typescript wants needs to include import m, { Vnode } from 'mithril'; so it ...
0
votes
0
answers
87
views
Async function FileReader issue - console.log() array works fine but shows length as 0 [duplicate]
async function parseFile(file, type) {
const fileSize = file.size;
const chunkSize = 1024 * 1024; // bytes
let offset = 0;
let chunkReaderBlock = null;
const hash = sha1.create();
const ...
1
vote
2
answers
125
views
Recursive Mithril View function - not rendering further
Here is a DisplayComment function. I want to make a comment thread. Basically a reply structure kind of thing. Each parent comment is displayed in the table and I want to render its replies just below ...
2
votes
1
answer
214
views
Getting a NodeList of the HTML tags in Mithril
Is there a way of having a NodeList of the HTML tags in Mithril? I need to get the width of the blocks. Something like that on vanilla js:
const blocks = Array.from(document.querySelectorAll('.blocks')...
0
votes
1
answer
156
views
Map 2 arrays in Javascript
I'm trying to display the content of 2 arrays of contained in an object.
When I map RType.information.Type the content of the array "Type" is displayed.
But nothing happened if I want to ...
1
vote
1
answer
260
views
render a canvas in mithril
how can i render a canvas inside mithril ?
here is my typescript code :
import * as mithril from 'mithril';
import m from 'mithril';
import * as PIXI from 'pixi.js';
var root = document.body
// The ...
1
vote
0
answers
194
views
Mithrill Error TS2344: Type 'State' does not satisfy the constraint 'Lifecycle<Attrs, State>'
I am new to Mithril. I am trying to follow this example for a pretty basic start: https://github.com/spacejack/mithril-ts-example. Here are my package.json, and tsconfig.json :
# package.json
{
&...