Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
45 views

Am nereew to JS and mithril . From the .net world. Wondering if there is an option to debug the setup code in Visual Studio. Am going through help documents and am here https://mithril.js.org/...
joseph son's user avatar
1 vote
1 answer
50 views

I have a scenario where I have a model class that has a style object which I pass directly to a mithril component. Then elsewhere I update the style object on the model and call m.redraw() and the DOM ...
glut's user avatar
  • 69
0 votes
0 answers
80 views

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 ...
Shail's user avatar
  • 29
0 votes
1 answer
69 views

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 ...
Ernanni's user avatar
  • 428
1 vote
0 answers
63 views

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 ...
Rick Ansay's user avatar
0 votes
1 answer
132 views

I am trying to initialize an onkeydown event when a component is created: var KeyboardComponent = { parse: function(e){ console.log("pressed: " + e.key); }, view: ...
happy songs's user avatar
1 vote
0 answers
353 views

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 ...
ajaleksa's user avatar
  • 374
0 votes
1 answer
335 views

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(...
tcw's user avatar
  • 3
0 votes
1 answer
143 views

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 ...
Tony's user avatar
  • 1
1 vote
1 answer
936 views

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 (...
Fernando Sanchez's user avatar
0 votes
3 answers
327 views

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 ...
Natalie's user avatar
  • 103
0 votes
0 answers
94 views

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 ...
Sukhamjot Singh's user avatar
1 vote
2 answers
141 views

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 ...
Sukhamjot Singh's user avatar
2 votes
1 answer
237 views

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')...
vasilek_'s user avatar
0 votes
1 answer
166 views

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 ...
Simon Leviev's user avatar
1 vote
1 answer
301 views

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 ...
Bussiere's user avatar
  • 1,254
1 vote
0 answers
217 views

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 { &...
Adina's user avatar
  • 139
0 votes
2 answers
363 views

I have sub-components that are updated by injecting state from the parent component. I need to populate the model using an asynchronous function when the value of the parent component changes. And I ...
COLEAN's user avatar
  • 695
0 votes
2 answers
657 views

I'd like to set an attribute in mithril.js inside the oninit function. For example, m('img', { oninit: (vnode) => { vnode.attrs.src = 'A url string'; } }) I want to check for ...
Sujit's user avatar
  • 1,802
0 votes
1 answer
350 views

I need to include a third-party js library in my website and a working example in plain HTML file is something like <div id="app"></div> <script src="app.js"></...
CoolMoon's user avatar
  • 177
0 votes
1 answer
557 views

I can't get a solution from this. an help will be appreciated import CodeMirror from "codemirror"; export default class RealTimeEditor extends Page { view() { window.onload = ...
Marco Colia's user avatar
1 vote
2 answers
997 views

The following code works as expected: it creates two counter buttons that persist their state and update on clicking: let Counter = function (vnode) { let count = 0 return { view: (vnode) =&...
phi_land_trophyist's user avatar
-1 votes
1 answer
627 views

I'm trying to implement Mapbox gl gs into a project I'm building with Mithril and am having issues with getting a map to render from any ID other then "app". Within the body of my html I ...
Daniel Patnode's user avatar
0 votes
1 answer
350 views

Let's say I have a HTML called post.html that has a codemirror editor in it. the post.html looks something like: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&...
AdhityaRavi's user avatar
0 votes
2 answers
255 views

Currently having an issue where a object with null values for all content except ID is returned when trying to complete a POST request from my front end. I'm also not receiving any error messages in ...
Daniel Patnode's user avatar
1 vote
1 answer
207 views

I was going through documentation and I ran following code in script.js var Article = { view: function(vnode) { console.log(vnode) return "This is article " + vnode....
pr0mpT_07's user avatar
  • 184
0 votes
1 answer
254 views

I'm trying out Mithril.js and have made three small components. let Map = (function() { let Map = {}; let parent; Map.oninit = function(vnode) { parent = vnode.attrs.parent; } ...
Commander's user avatar
1 vote
1 answer
94 views

I'm trying to render the result of the function renderVerticalCards, but nothing is returned in the DOM, other than the outer divs (those from outside the function call). I have confirmed through the ...
Jakob Handberg Lystbæk's user avatar
1 vote
1 answer
414 views

I'm trying to add options to a previously created Vnode (select element). The element is returned before the options are available, since they come from an async function. Although I try to set the ...
Jorge Cavaleiro Dias's user avatar
0 votes
2 answers
1k views

When using m.route, does everything under it have to be rendered using Hyperscript (not counting JSX)? Is it possible to mix pure HTML with multiple separate parts rendered using Hyperscript? Suppose ...
Prid's user avatar
  • 1,694
3 votes
2 answers
316 views

I am using mithril.js in frontend application and backend application is running on ipv6 environment. Calling post ajax request to backend using mithril.js. async post(url, body = {}) { return ...
Himanshu Patel's user avatar
0 votes
1 answer
237 views

I am making an dahboard creator tool. Dashboard is set of rows, each row have boxes. So I trying to make list of lists of items. Items can move between lists. Lists can be sorted between each other. ...
Vladimír Mlázovský's user avatar
0 votes
2 answers
473 views

This is a silly question but it's stumped me for a while now. I'm currently trying to design a Mithril.js component that returns a <div> object that includes a <script> tag. I've just ...
paulinho's user avatar
  • 302
0 votes
1 answer
312 views

I have been working with a framework using mithril.js and wish to add this script that draws an interactive tree into a component on my website. So far, I just placed the JS code inside the script ...
paulinho's user avatar
  • 302
0 votes
1 answer
113 views

I'm working on a project in Javascript and hit a problem that I don't understand. Basically I've written a map generator that is generating maps from noise, that bit is fine and working. I want the ...
adaliabooks's user avatar
0 votes
1 answer
581 views

File TodoApp.js: ... const Todo = { oninit(vnode) { ... // ok }, oncreate() { ... // ok }, onbeforeremove() { ... // not firing }, onremove() { ... // not ...
ashark's user avatar
  • 28
0 votes
2 answers
537 views

I am very very new to javascript and mithril.js. I am trying to create a very simple bar plot using mithril.js and d3.js. But, I am not having any luck even getting the axis in place. Firstly, I ...
AdhityaRavi's user avatar
0 votes
1 answer
671 views

I was able to disable the button after click but the page is not getting submitted, it just got disabled. How can I submit the page and prevent it from multiple clicks in mithril.js? m(".submit", m("...
PRONAY PRAMANIK's user avatar
0 votes
1 answer
1k views

I'm trying to get some initial data for a component using an async function oninit then updating that component each time 'Show more' button is clicked. Here is the component: const Listings = { ...
Alin Climente's user avatar
0 votes
1 answer
535 views

I am translating a JQuery-based app to Mithril. That app uses Dragula to allow drag/drop to reorder lists. Dragula reorders the li elements in the DOM. When the Drop event is fired, I sync the model ...
rupps's user avatar
  • 9,947
0 votes
1 answer
144 views

This is my mithril code: m('input', { id: 'someBox', placeholder: 'Type something', oninput: () => { query = document.getElementById('someBox).value; //do something ...
Sujit's user avatar
  • 1,802
1 vote
2 answers
2k views

I want to be able to store the value of the text inputted in a variable. I thought something like would work: m('input', { placeholder: 'Type to search...', oninput: () => { alert(this....
Sujit's user avatar
  • 1,802
0 votes
1 answer
99 views

I am using Mithril and am dynamically mounting some content. the first time the page loads everything works fine. Once I click a button, which causes one thing to unmount and another to mount, the ...
Michael Stachowsky's user avatar
0 votes
1 answer
1k views

I am making a quiz web app. I have a class called an "answerBox", which currently just contains a button, an ID, and a Boolean. I want to call a "check Answer" function that determines if my answer ...
Michael Stachowsky's user avatar
0 votes
1 answer
55 views

I'm trying to use a diff library in order to log edit histories of user posts for my page. That library gives me a long JSON data for diffs to store in my database and i am using the same repository's ...
linx's user avatar
  • 1
0 votes
0 answers
144 views

I have a mithril ListWidget that displays a list of Items. The icon you see on the right allows to expand and collapse the details. It is a field "expanded" in each Item vnode state. Now I want to ...
rupps's user avatar
  • 9,947
0 votes
0 answers
209 views

I'm trying to draw in a canvas created in a Mithril's component. My problem is that I don't want this component's view to be redrawn when the application needs. I found that the onremove/oncreate ...
Arthur T's user avatar
1 vote
1 answer
432 views

I'm trying to get webpack and babel working (I'm new to both). When I run the webpack-dev-server compilation goes fine but content from my imported module isn't working. Here is how I configure my ...
Francesco's user avatar
  • 1,857
3 votes
2 answers
1k views

is there no event capturing? Id like to force event handling order, in autocomplete component, onblur event fires before onclick on item in a list, causing the list to toggle twice and so remaining ...
janat08's user avatar
  • 1,787
0 votes
1 answer
324 views

I want to render state that is updated every request animation frame. I want to encapsulate state with an update method and corresponding component: But that fails because it's not correct usage of ...
eguneys's user avatar
  • 6,490

1
2 3 4 5 6