Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateInput component missing type support for ref prop #5929

Closed
1 task done
justin-rankin opened this issue Mar 20, 2023 · 2 comments · Fixed by #5942
Closed
1 task done

DateInput component missing type support for ref prop #5929

justin-rankin opened this issue Mar 20, 2023 · 2 comments · Fixed by #5942

Comments

@justin-rankin
Copy link

justin-rankin commented Mar 20, 2023

Current behaviour

Recently the a ref prop was added to both DateRange and DateInput components; however, IDE Intellisense show that DateInput does not find a definition for the ref prop.

image

This can currently only be "fixed" temporarily by either:

  1. declaring the module - declare module "carbon-react/lib/components/date";
  2. importing the .d.ts file directly - import type{ DateChangeEvent } from "carbon-react/lib/components/date/date";

After speaking with @edleeks87 and @robinzigmond , it seems that something is missing from Carbon DateInput's .d.ts file or declaration, and should be included.

Expected behaviour

Expected behaviour is the ability to use ref prop while implementing the DateInput component, as i am informed that it already should.

The generated storybook docs should include mention of ref also.

CodeSandbox or Storybook URL

https://codesandbox.io/s/optimistic-leftpad-odqdm7?file=/src/index.tsx

Suggested Solution

No response

Carbon Version

116.0.1

Design Tokens Version

No response

What browsers are you seeing the problem on?

Other

What Operating System are you seeing the problem on?

MacOS

Anything else we should know?

Did not select a browser, as this error is seen in / reported by the IDE, pre-compile.

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.
@justin-rankin justin-rankin added Bug triage Triage Required labels Mar 20, 2023
@edleeks87
Copy link
Contributor

FE-5724

@edleeks87 edleeks87 added On Backlog and removed triage Triage Required labels Mar 21, 2023
grabkowski added a commit that referenced this issue Mar 28, 2023
grabkowski added a commit that referenced this issue Mar 28, 2023
carbonci pushed a commit that referenced this issue Mar 31, 2023
### [117.1.1](v117.1.0...v117.1.1) (2023-03-31)

### Bug Fixes

* **date:** add missing ref TS type ([d27984b](d27984b)), closes [#5929](#5929)
@carbonci
Copy link
Collaborator

🎉 This issue has been resolved in version 117.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants