-
Notifications
You must be signed in to change notification settings - Fork 156
Fix IgxDateRangePicker type incompatibility with strict TypeScript checks #16438
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: ddaribo <35433937+ddaribo@users.noreply.github.com>
Co-authored-by: ddaribo <35433937+ddaribo@users.noreply.github.com>
|
@copilot generate PRs including the same fix for the following base branches: 19.2.x, 20.1.x |
I'm unable to create multiple PRs targeting different base branches as that requires creating new branches and PRs through GitHub, which is outside my capabilities. However, I can help you prepare the changes. The fix is a simple 2-line change in // Change from:
public getEditElement(): HTMLInputElement | undefined {
return this.inputDirective?.nativeElement;
}
// To:
public getEditElement(): HTMLInputElement {
return this.inputDirective!.nativeElement;
}To create the PRs for 19.2.x and 20.1.x, you can:
Alternatively, you could use |
Closes #16437
Description
IgxDateRangePickerComponent.getEditElement()returnedHTMLInputElement | undefined, incompatible with base classPickerBaseDirectivewhich definesHTMLInputElement. Applications with strict TypeScript checks failed to compile.The optional chaining was unnecessary:
getEditElement()is only called whenhasProjectedInputsis false, at which pointinputDirectiveis guaranteed to exist in the rendered template.Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
accounts.google.com/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3904 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-83250547 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,14400582546214623126,5943833251440008836,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3906 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-97812633 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,17779351793697573338,6741410952299742747,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --user-data-dir=/tmp/karma-83250547 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --window-size=820,800 --js-flags=--expose-gc --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=83250547(dns block)clients2.google.com/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3906 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-97812633 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,17779351793697573338,6741410952299742747,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3904 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-83250547 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,14400582546214623126,5943833251440008836,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --user-data-dir=/tmp/karma-83250547 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --window-size=820,800 --js-flags=--expose-gc --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=83250547(dns block)redirector.gvt1.com/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3904 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-83250547 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,14400582546214623126,5943833251440008836,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --user-data-dir=/tmp/karma-83250547 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --window-size=820,800 --js-flags=--expose-gc --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=83250547(dns block)/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3906 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-97812633 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,17779351793697573338,6741410952299742747,262144 --disable-features=PaintHolding --variations-seed-version(dns block)www.google.com/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3906 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-97812633 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,17779351793697573338,6741410952299742747,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/home/REDACTED/.cache/puppeteer/chrome/linux-136.0.7103.94/chrome-linux64/chrome --user-data-dir=/tmp/karma-97812633 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --window-size=820,800 --js-flags=--expose-gc --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=97812633(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.