Angular Material input field with disabled state and a tooltip

 <div>
    <mat-form-field *>
      <input matInput #filterBox (keyup)="searchBox(filterBox.value)" disabled />
      <mat-label>Filter</mat-label>
    </mat-form-field>
  </div>

<mat-button-toggle-group
      matTooltip="TESTING "
      #toggleButtons="matButtonToggleGroup"
      (click)="filterBox(toggleButtons.value)"
      multiple
    >
      <mat-button-toggle value="TEST1">TEST1</mat-button-toggle>
      <mat-button-toggle value="TEST2">TEST2</mat-button-toggle
      >

    </mat-button-toggle-group>

If a button from the button-toggle-group is clicked, I want the input to be disabled. Additionally, if the input is disabled, I want to see a tooltip. Any suggestions?

Answer №1

It seems that tooltips do not work on disabled elements for some mysterious reason.

To solve this issue, try wrapping your element and placing the tooltip on the wrapper instead.

<span title="Blarg">
    <button disabled>Clickies</button>
</span>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Receiving an Error 404 "not found" when making a Node.js POST Request using an Angular application

I have been working on developing an API with Node.js that connects to an SQL Server database. While my GET requests are functioning properly, I am encountering errors with my POST request. To organize my node project, I have split it into two files - a ro ...

Issue encountered during node execution related to firebase; however, the application continues to run smoothly, including firebase integration with angular-universal

Currently, I am integrating Angular Universal with Node.js and using Firebase as dummy data for my application. It's functioning well, allowing me to fetch and save data in Firebase seamlessly. When running the app in Angular, there are no errors app ...

Tips for incorporating asynchronous validation into a reactive form

Trying to implement asynchronous validation in an angular 13 app following the official guide Below is the implementation: check-current-password.validator.ts @Injectable({ providedIn: 'root' }) export class CheckCurrentPasswordValidator implem ...

The event triggered by the tinymce editor does not immediately refresh the Angular Component

I am currently working on creating an Angular application using a WordPress instance of TinyMCE. Within the editor, there are non-content-editable elements that trigger a modal window to open when clicked. However, I have encountered an issue where the mo ...

Is there a way to configure routerLinkActive specifically for these routes?

My website has a navigation bar with the following items: Users, Categories, Products, etc. The routes are set as Main/Users, Main/Categories. I have successfully highlighted the items using routerLinkActive, however I also want to highlight the Users item ...

How to access properties of objects within an array in Angular 4

Is there a method to call only the $values from each rate record in my array that I want to read? https://i.sstatic.net/MT2XK.png This is what I have done to access this array: async ngOnInit() { this.product$ = await this.reviewService.getReview(th ...

Is component change temporarily paused when the cancel button is triggered from a form that executes a route change?

I am working on adding a cancel button functionality to a form for users. The idea is to have the cancel button inside the form, next to the submit button. When the user clicks on the cancel button, I want the route to change and display the about componen ...

ESLint warning: Potentially risky assignment of an undetermined data type and hazardous invocation of an undetermined data type value

Review this test code: import { isHtmlLinkDescriptor } from '@remix-run/react/links' import invariant from 'tiny-invariant' import { links } from '~/root' it('should return a rel=stylesheet', () => { const resp ...

How to handle type errors when using properties in Vue3 Single File Components with TypeScript

I've hit a roadblock while attempting to utilize properties in Vue3. Despite trying various methods, I keep facing issues during the type-check phase (e.g.: yarn build). The project I'm working on is a fresh Vue3-ts project created using Vite. B ...

Using ngFor in Angular 6 to create a table with rowspan functionality

Check out this functional code snippet Desire for the table layout: <table class="table table-bordered "> <thead> <tr id="first"> <th id="table-header"> <font color="white">No.</font> </th> <th id="table-hea ...

The absence of type-safety in the MUI System sx is a glaring issue

I want to ensure that the TypeScript compiler can identify typos in my MUI System sx props: import { Box, SxProps, Theme, Typography } from '@mui/material' const sxRoot: SxProps<Theme> = { width: '100vw', height: '10 ...

Create a prop type that can be either a single number or an array of numbers, depending on the value of another

Seeking a solution, I am exploring an example using arrays with the 'multi' property. When 'multi' is true, the items should be of type number[]. Otherwise, they should be of type number. interface EnhancedSelectProps { items: multi ? ...

What could be the reason for my Angular 4 ChartJS component not displaying correctly?

I am currently troubleshooting why the Angular 4 ChartJS component fails to render properly. After successfully installing the package using yarn and ensuring correct imports, I can observe the Chart object in the Chrome console. However, despite this, th ...

What allows the type expression to be considered valid with a reduced amount of arguments?

Currently diving into Typescript and focusing on functions in this unit. Check out the following code snippet: type FunctionTypeForArrMap = (value: number, index: number, arr: number[]) => number function map (arr: number[], cb: FunctionTypeForArr ...

Tips for preloading icon font in Angular server-side rendering (SSR)

Is it possible to preload icons and fonts before the HTML content is rendered? I have been using a preload strategy to try and achieve this. index.html <!doctype html> <html lang="en"> <head> <meta charset="utf-8&quo ...

Error TS2339: The property 'SOLDE' is not found in the 'AdvTitres' type

I am working with an array and need to retrieve the value of the SOLDE variable. You can find the JSON file here. When I try to access the SOLDE property, I get the following error message: error TS2339: Property 'SOLDE' does not exist on type ...

Incorporate Ng-Survey multiple times within one component

Incorporating the ng-surveys template into my Angular application via has been successful. However, I encountered an issue where when using the template selector *ngFor to display multiple surveys on the same page, the browser treats all the surveys as id ...

Can you explain the distinction between using keyof within an indexer versus outside of it?

Consider the TypeScript snippet below: type ForwardVal<T> = { [K in keyof T]: string; }; type ForwardKeyOf<T extends string | number | symbol> = { [K in T]: string; }; type ByObj = ForwardVal<number[]>; // string[] ...

Encountering "No overload matches this call" error in Typescript while working with fetched data and material-ui

Before attempting to create a dropdown menu with an array retrieved using useSWR, I first practiced creating one with a hardcoded array. I used this for the initial practice: https://codesandbox.io/s/76k0ft?file=/demo.tsx:1819-2045 Instead of using a hard ...

Using Packery / Masonry in an Angular 2 project

I've been struggling to make Packery / Masonry work within a component. Even though I am using imagesLoaded, Packery is detecting the container but giving it a height of zero, indicating that the content hasn't loaded properly. I have tried imple ...