Questions tagged [data-bind]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
2answers
286 views

Magento 2 - cart page custom UI component foreach binding

I want to add a custom UI component template on the cart page. The data is in JSON format and wants to bind forach to display a list of data. data like as {'name':'5% discount','description':'5% ...
1
vote
1answer
92 views

How to populate Purchase Order Number with a random rumber?

Magento 2.3.x Purchase Order used as a payment method requieres a purchase order number. Some of our customers don't have that number, so we need to pre-populate this input field with a random content ...
1
vote
1answer
1k views

Magento2: How to pass data from model file to knockout.js?

I want to pass the data from model file to knockout.js in Magento2. My Code: Model file: <?php namespace Amy\MyPackage\Model\Total\Quote; /** * Class Custom * @package Mageplaza\HelloWorld\Model\...
1
vote
0answers
127 views

Magento 2 - bind to .html template load complete event

I need to do some DOM manipulation within a JS mixin after .html template is loaded. My mixin is for following component: module-braintree/view/frontend/web/js/view/payment/method-renderer/hosted-...
1
vote
0answers
300 views

Slick Slide After Scroll Slide is Working Magento2

I have used Slick Slider for Product Comparison in Magento 2.3. The issue here is when I scroll alone the slick slider gets activated. But I need to load slider before. Its Like I Am new to ...
0
votes
1answer
646 views

Magento2: Function of enable/disable (yes/no) button for any module

I Have a module for the new shipment method with dropdown option (yes/no), to enable and disable the module function. I want to know how the module function works off while select No, and module work ...
0
votes
1answer
164 views

Concatenate static Image path with KnockoutJS data-bind

This is my JS File code define([ 'uiComponent' ], function (Component) { 'use strict'; var some_products = window.checkoutConfig.my_specificProducts; return Component.extend({ ...
0
votes
1answer
170 views

Magento 2 bind ko scope to a non-html/virtual element

I want to bind customer scope to a non-html element as I do not want html to be loaded if customer is not logged in. In the OOTB magento inside vendor/magento/module-theme/view/frontend/templates/html/...
0
votes
1answer
2k views

How to pass text input value to js in magento 2 knockout js?

In my template.html file, I am having only the input field. After I complete entering the text in the input field, I need to pass the value to the js file without any button click. How to achieve this ...
0
votes
0answers
5 views

Accordion not working after ajax data update : M2

At page load accordion is working good, but when i replace whole id="accordion" div using ajex after that accordion isn't working. In ajax content have same html structure as below. <div ...
0
votes
0answers
8 views

Is it possible to bind multiple button click events to single value using knockout JS?

This is my code, its not working <button id="font-size-increase-button" style="margin:5px;" data-bind="value: getObservable('selected_font_size'), event{ click: ...
0
votes
0answers
20 views

Magento2 ui component binding issue for file uploader in knockout template

I am using knockout file uploader in one of checkout step, please check below screenshot: below is my code to initialize file uploader but somehow its not working: <div class="reference-...