Skip to main content

Questions tagged [knockout.js]

Knockout.js is an open source JavaScript library for dynamic HTML UIs using the Model-View-View Model (MVVM) pattern.

0 votes
2 answers
342 views

Proper way to listen for selectionStart and selectionEnd in HTML text inputs to handle leftward dragging of mouse, with knockout

I am listening for selectionStart and selectionEnd with knockout and it's working fine when the user clicks with the mouse and drags rightward to create the selection. But if the user clicks in the ...
Tim's user avatar
  • 8,873
0 votes
1 answer
14 views

Knockout jumping the gun when ajax is involved and acting as though events have fired when they haven't fired yet

I am using <details><summary> elements as a quick "accordion" and fetching data when the user expands the element by clicking on the summary. A fetch-data-only-on-demand ...
Tim's user avatar
  • 8,873
0 votes
0 answers
106 views

Knockoutjs keeps asking for customer().fullname

I am writing a module where I am displaying the date/time of the last login inside a block in the customer account sidebar. It works well with plain php but I ran in the issue of the page being cached....
Jake's user avatar
  • 175
-1 votes
1 answer
27 views

Add static comment on every question answered on form

I have a form with lot of questions. On every question answered I need to filled a predefined string information (called comments) in an readonly textarea. Is there any better solution? I made a ...
rohit tiwari's user avatar
1 vote
1 answer
49 views

How does data bind paranthesis work in Knockout.js

I have this input and I want to change its status, so it can be readonly or editable. <input type="text" data-bind="attr: {readonly: isViewMode || isNotEditableInvoice}, value: model....
Foreastbtch's user avatar
1 vote
1 answer
89 views

How to update knockout js input field from content script on Chrome extension?

I am creating my first complex chrome extension using javascript to update an input field on a 3rd party website. After hours of research, I found that knockout js is being used. Here I found the ...
Franklin Tardencilla's user avatar
0 votes
1 answer
537 views

Magento 2.3.4 minicart not working only on product detail page

I have added a minicart on the header of my custom theme. The issue is that the items added to the cart only show on the product detail page. On other pages, the minicart dropdown only shows the ...
Akhilesh's user avatar
  • 1,273
0 votes
1 answer
433 views

In magento 2 Not show the value after ajax response in UI Component

i am trying to get shipping amount in seller wise in checkout summary i got the amount from ajax i render the data in html but it is not showing after ajax without ajax it is working Magento_Checkout\...
hari prasath's user avatar
0 votes
1 answer
419 views

What is the purpose of getTemplate() in knockout Js Magento 2?

I'm learning Knockout JS in Magento 2. There is a function getTemplate() which syntax looks like this . I want to know its working and purpose. FilePath: app/code/CloudyDigitals/LearnKnockout/view/...
Sufyan Akhter's user avatar
0 votes
1 answer
38 views

Knockout Foreach creating duplicate items

On our UI, we have classrooms that are eligible for assessments. After creating and adding in eligibleclassrooms, I am getting duplicates of each classroom type. The expected output is one of each ...
Corey Sutton's user avatar
  • 1,069
0 votes
1 answer
60 views

create observables dynamically and show it in html ,knockout?

HTML :- <div class="row" style="margin-left: 10px;" data-bind="foreach: {data: data, as: 'data1'}"> <span style="color: red; display: none;" data-bind=...
raj's user avatar
  • 11
0 votes
0 answers
819 views

Failed to load the js file component in console[Magento 2]

I am trying to show current time with running seconds on a page under adminhtml. I wrote the code for js in Namespace_Module/view/adminhtml/web/js/timejs.js And the code is define( ['jquery', '...
mrshiam's user avatar
  • 13
0 votes
1 answer
38 views

How to condition appearance of div in Knockout JS based on value from $root?

I want to show/hide a div in my code based on a certain value. Using Knockout JS context debugger I found the property I need to compare in $root context. The property path I get from developer ...
Alexandru Tugui's user avatar
0 votes
1 answer
28 views

Getting a value of ko.toJS using Selenium C#

I'm trying to get values of input element which generated with ko.toJS using Selenium in Firefox: <input autocomplete="on" class="form-control input-block-level " data-bind=&...
Dilmurod Azimov's user avatar
0 votes
1 answer
64 views

Knockout Observable not updating on Modal DOM/UI

Knockout observable value not updating on bootstrap Modal. In debug I can see that the value have been successfully added to observable. It just not updating/appearing on the modal DOM. self....
whatISboolean's user avatar

15 30 50 per page
1
3 4
5
6 7
1367