Liquid, JavaScript, themes, sales channels
I'm looking for a minimum viable code example using a TextField UI Extension in a POS modal. Right now whatever text I type into the field gets immediately removed. The documentation is here but does not include an example.
Here's what I have so far, it renders the text box as expected but typing into it is fruitless, it does not change the value persistently.
const company = {val: ''};
function handleCompany(val) {
company.val = val
}
function getCompany() {
return company.val
}
companyText = root.createComponent(TextField, {label: 'Company', required: true, disabled: false, value: getCompany(), onChange: val => {handleCompany(val)}})
screen.appendChild(companyText)
User | RANK |
---|---|
37 | |
28 | |
13 | |
12 | |
9 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023