refactor: counter#1136
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
| // eslint-disable-next-line @typescript-eslint/consistent-type-assertions, @typescript-eslint/non-nullable-type-assertion-style | ||
| useImperativeHandle(ref, () => inputRef.current as ElementRef<'input'>); |
There was a problem hiding this comment.
Is there a better way to do this? I'm trying to use ref in sibling elements.
There was a problem hiding this comment.
Using this is fine tbh, but you can type it better like so:
type CounterRef = ElementRef<'input'> | null;
const inputRef = useRef<CounterRef>(null);
useImperativeHandle<CounterRef, CounterRef>(ref, () => inputRef.current);There was a problem hiding this comment.
This seems to work perfectly, thanks @chanceaclark
| // eslint-disable-next-line @typescript-eslint/consistent-type-assertions, @typescript-eslint/non-nullable-type-assertion-style | ||
| useImperativeHandle(ref, () => inputRef.current as ElementRef<'input'>); |
There was a problem hiding this comment.
Using this is fine tbh, but you can type it better like so:
type CounterRef = ElementRef<'input'> | null;
const inputRef = useRef<CounterRef>(null);
useImperativeHandle<CounterRef, CounterRef>(ref, () => inputRef.current);
⚡️🏠 Lighthouse reportLighthouse ran against https://catalyst-latest-p1mjxt722-bigcommerce-platform.vercel.app 🖥️ DesktopWe ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:
📱 MobileWe ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:
|
* refactor: tag + usages (#1107) * refactor(core): radio-group (#1106) * fix: merge with main (#1105) * refactor: remove file-chooser, no usages (#1110) * refactor: carousel (#1109) * refactor: badge (#1108) * fix: eslint issues in tabs and badge * refactor: gallery refactor (#1104) * fix(core): lint issues from gallery refactor * refactor(core): slideshow (#1111) * refactor: message component (#1112) * refactor: badge takes children (#1114) * chore(core): delete skeleton (#1113) * refactor: modal (#1115) * refactor: button (#1116) * fix: render cart count in badge * refactor: datepicker uses popover primitives (#1118) * refactor: accordions component (#1101) * refactor(core): product card (#1117) * refactor: input (#1131) * refactor: textarea (#1134) * refactor: checkbox (#1135) * refactor: date picker (#1130) * fix: radio group error state in pdp (#1133) * refactor: pick list (#1139) * fix: forward ref to button (#1140) * refactor: select (#1143) * fix: use correct font weight in badge (#1151) * refactor: swatch (#1144) * refactor: rectangle list (#1145) * refactor: pick list props (#1146) * refactor: radio group props (#1147) * refactor: breadcrumbs (#1148) * refactor: footer (#1154) * fix: forward DatePicker ref (#1155) * refactor: label (#1153) * refactor: blog post card (#1152) * refactor: rating (#1150) * refactor: sheet (#1149) * refactor: counter (#1136) * refactor: header & navigation menu (#1160) * fix: accordions props (#1162) * fix: remove transparent overlay prop in Sheet (#1163) * fix: gallery props (#1164) * feat: add pageSize prop to carousels (#1165) * chore: add changeset * chore: update changeset * fix: missing padding for sm viewport in quick search * fix: close mobile nav on navigation * fix: add aria-label to account tabs * fix: skip blog post card regression * fix: p wrapper for cart link * fix: update header visual regression test * fix: correct capitlization for tabs * fix: change hover for on click in test * fix: swatch test * fix: changeset examples * feat: add label prop to tabs * fix: update account and register spec * fix: update tests with latest changes --------- Co-authored-by: Matthew Volk <matt.volk@bigcommerce.com> Co-authored-by: Drew Pledger <drew@makeswift.com> Co-authored-by: Daniel Almaguer <daniel.almaguer@bigcommerce.com> Co-authored-by: Matthew Volk <volkmattj@gmail.com> Co-authored-by: Anudeep Vattipalli <anudeep.vattipalli@bigcommerce.com>
What/Why?
Testing
Locally