bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Feature request: Add setting to enable/disable typeahead

Open DanieleTorino opened this issue 8 years ago • 3 comments

Please add a setting typeahead-enable analogous to tooltip-enable that allows to enable/disable the typeahead.

We use forms that, depending on the users permissions, can either be normal fields using typeahead or read only fields. When the fields are read only we would like to disable the typeahead.

Currently the only way to achieve this, is using an ng-if and a copy of the input field without typeahead attributes.

DanieleTorino avatar Oct 12 '16 09:10 DanieleTorino

Have you tried ng-disabled ? That's what we're using and it seems to work just fine at disallowing input.

jblaketc avatar Jan 07 '17 00:01 jblaketc

ng-disabled disables the input. However, in bootstrap, disabled input should be grayed out, it is not for this case. Neither does ng-readonly gray out the typeahead input.

shaozi avatar Jul 26 '17 23:07 shaozi

It's not grey because typeahead applies some inline styles to the inputs, one of them being background-color: transparent;, which override form-control[disabled] from bootstrap.

I can think of some nasty workaround involving !important for the time being until this can be fixed: .form-control[disabled][uib-typeahead] { background-color: #eeeeee !important; }

relair avatar Jul 18 '18 08:07 relair