Polaris is a react library provided by Shopify to keep the third party app User Interfaces consistent with the admin theme in Shopify shops.
Questions tagged [polaris]
98 questions
0
votes
2 answers
How to display a list of products from a set of data in react with polaris?
I am trying to create a list of products using a set of data in react. I want to return the titles from this data and display it on screen in a list. I am trying to use a forEach loop but I'm. not sure exactly how to achieve this.
This is what I…

AlexTWO
- 61
- 6
0
votes
1 answer
How to fix CWE-20: Improper Input Validation
I have used polaris for static scan on one of my projects. The scan results shows that one of the java class has CWE-20 defect. It is reported for this particular line.
String propValue = req.getParameter(propertyName);
I have tried a few possible…

Rishikesh-12
- 43
- 1
- 2
- 7
0
votes
0 answers
How to center a Polaris DisplayText (or how to style Shopify Polaris components in general)?
I just started out with the Shopify Polaris library.
I have a title made like this:
Contact
Now I want to center that. But setting className or using inline styling has no effect, thats a known fact...
So how…

IonicMan
- 743
- 1
- 12
- 31
0
votes
1 answer
Set debounced search in ReactJS
I'm new in ReactJS. But used to with VueJS. Previously, I was developing the projects in VueJS. But in ReactJS, I'm facing difficulty in setting pagination where I want something like this.
Whenever user changes search value, it should reset the…

Akshay Vaghasiya
- 1,597
- 9
- 36
- 60
0
votes
1 answer
How do I map an array from GraphQL to a ResourceList element?
I've made a GQL query in which I receive data on all of my products as objects within an array. Here is one of the objects:
With this data, I am trying to map each individual product to a element within a . However I am…

RyanDawkes
- 47
- 5
0
votes
1 answer
Shopify React Next Cannot read property "/_app" of undefined
I am trying to setup an environment to develop a shopify theme, and I followed the tutorial found here:
https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/build-your-user-interface-with-polaris
But when I connected my server, the…

Darkbound
- 3,026
- 7
- 34
- 72
0
votes
1 answer
I am having with set state in my Shopify App using Node React
I am making a Shopify app using Shopify Polaris.
I used the ActionList component.
https://polaris.shopify.com/components/actions/action-list
I want to change the state value on the onAction event.
I did like this.
const [searchValue,…

RM-Digit
- 94
- 8
0
votes
1 answer
Invalid hook call. Hooks can only be called inside of the body of a function component. in shopify polaris
I am using Shopify Polaris to build an application and have a common post data method for fetching data but when I do this I am getting the following error.please help me to do this
Error: Invalid hook call. Hooks can only be called inside of the…

Vengat
- 119
- 1
- 9
0
votes
1 answer
Unable to get updated value in form onsubmit callback / Shopify Polaris React Component
Issue summary
Hi Team,
I am new to Polaris and trying to create react signup form with following code
import React, { useCallback, useState } from "react";
import {
Button,
Form,
FormLayout,
Layout,
Checkbox,
Card,
Page,
TextField,
}…

Vengat
- 119
- 1
- 9
0
votes
1 answer
GraphQL query issue - shopify polaris
I got an issue with graphQL when I was developing the shopify app.
The logic is simple. I need to get lineItems from the shopify store using the graphQL.
Here is the code for gql.
const GET_ORDER_DETAIL = gql`
query getOrderDetail($orderId: String)…

JB2001216
- 29
- 1
- 6
0
votes
1 answer
How can I show time as HH:MM format?
I am showing time using TextField component in React Polaris.
Currently, it shows as 01:25:00 PM.
Is there any way to show only HH:MM format?

Remy Wang
- 666
- 6
- 26
0
votes
1 answer
Shopify ResourcePicker not displayed
The Polaris ResourcePicker component is not showing at all in my embedded app and I don't know why. Here is my code:
import React from "react";
import ReactDom from "react-dom";
import * as PropTypes from 'prop-types';
const session =…

RaphArbuz
- 869
- 1
- 9
- 19
0
votes
1 answer
How to show list current filter in Resource list
I'm using resource list control of polaris. I have add some filter conditions and my list displayed with correct data.
But i don't see current list filter area where i can remove my conditions.
How to display it?
This is my filter declaretion,
I…

Anh Lam
- 122
- 1
- 1
- 7
0
votes
4 answers
Polaris Shopify Error when I import style.css
I get a compilation error when I import "@shopify/polaris/styles.css";
This is a picture of the error:
But whenever I go in to the styles.css, and do a search for the line that errors out, it doesn't find it so it seems like as though that line…

jim
- 1,026
- 2
- 15
- 37
0
votes
1 answer
Shopify Polaris Page tag not working - Rails and reactJS
I'm trying to make a shopify app and I want to use ruby on rails with polaris and reactJS. When I try to use the Page component taken from shopify's website, nothing ever gets rendered to the screen. Here's an example of what I'm talking about.…

jim
- 1,026
- 2
- 15
- 37