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

[Tooltip] Allow global configuration of delays #3286

Closed
vasslehel-c opened this issue Feb 24, 2017 · 8 comments
Closed

[Tooltip] Allow global configuration of delays #3286

vasslehel-c opened this issue Feb 24, 2017 · 8 comments
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P5 The team acknowledges the request but does not plan to address it, it remains open for discussion

Comments

@vasslehel-c
Copy link

Feature request, or proposal:

Allow global configuration of tooltip show/hide delay

What is the expected behavior?

Configuring the show/hide delay of tooltips through a provider

What is the current behavior?

Every tooltip have to be configured individually

What is the use-case or motivation for changing an existing behavior?

Instead polluting the markup and changing tens of tooltips, it would be nice to have a mechanism to configure delays globally.

@kara kara added Accessibility This issue is related to accessibility (a11y) P5 The team acknowledges the request but does not plan to address it, it remains open for discussion labels Feb 24, 2017
@kara kara added feature This issue represents a new feature or feature request rather than a bug or bug fix and removed Accessibility This issue is related to accessibility (a11y) labels Mar 4, 2017
@torsten-simon
Copy link

+1 for this one!

@andrewseguin andrewseguin changed the title Allow global configuration of tooltip show/hide delay [Tooltip] Allow global configuration of delays Oct 19, 2017
@CDDelta
Copy link

CDDelta commented Jan 1, 2018

This is already possible by providing a MatTooltipDefaultOptions with the token MAT_TOOLTIP_DEFAULT_OPTIONS. See here.

@tmakin
Copy link

tmakin commented Jan 10, 2018

This was working for me in 5.0.3 but seems to have disappeared from 5.0.4. There is also no mention of MatTooltipDefaultOptions in the docs referenced by @CDDelta?

@narendrasinghrathore
Copy link

narendrasinghrathore commented Mar 11, 2018

@andrewseguin
Facing error while import
import {MAT_TOOLTIP_DEFAULT_OPTIONS, MatTooltipDefaultOptions} from '@angular/material';

/node_modules/@angular/material/material"' has no exported member 'MatTooltipDefaultOpti
ons'.
/node_modules/@angular/material/material"' has no exported member 'MAT_TOOLTIP_D
EFAULT_OPTIONS'.

[https://material.angular.io/components/tooltip/overview](Reference url)

@andrewseguin
Copy link
Contributor

@narendrasinghrathore
Copy link

narendrasinghrathore commented Mar 23, 2018

@andrewseguin
why i am getting error?
package.json
"@angular/animations": "5.0.0", "@angular/cdk": "5.0.0", "@angular/common": "5.0.0", "@angular/compiler": "5.0.0", "@angular/core": "5.0.0", "@angular/forms": "5.0.0", "@angular/http": "5.0.0", "@angular/material": "5.0.0", "@angular/platform-browser": "5.0.0", "@angular/platform-browser-dynamic": "5.0.0", "@angular/router": "5.0.0",

"@angular/cli": "1.6.6", "@angular/compiler-cli": "5.0.0", "@angular/language-service": "5.0.0", "@types/jasmine": "2.5.53", "@types/jasminewd2": "2.0.2", "@types/node": "6.0.60",
image

@edertxodev
Copy link

Hi!

That worked for me:

export const customTooltipDefaults: MatTooltipDefaultOptions = {
    showDelay: 100,
    hideDelay: 100,
    touchendHideDelay: 100
}

@NgModule({
    imports: [
        ...    
    ],
    exports: [
        ...
    ],
    providers: [
        { provide: MAT_TOOLTIP_DEFAULT_OPTIONS, useValue: customTooltipDefaults }
    ]
})
export class AppModule { }

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
None yet
Development

No branches or pull requests

8 participants