Skip to content

Commit a553ede

Browse files
committed
SVYX-1128 Typeahead dropdown caret [AI]
Add showAsCombo class for typeahead styling
1 parent f1edd5f commit a553ede

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

components/projects/bootstrapcomponents/svy_bootstrapcomponents.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,28 @@ body > .dropdown{
477477
.svy-form-floating > .form-control:-webkit-autofill ~ label{
478478
opacity: .65;
479479
transform: scale(.85) translateY(-.5rem) translateX(.15rem);
480+
}
481+
482+
/* typeahead show as combobox */
483+
.showAsCombo{
484+
/* This class is added to the input when the typeahead is configured to show as a combo, it allows us to show the dropdown icon and set the correct cursor */
485+
}
486+
bootstrapcomponents-typeahead {
487+
position: relative;
488+
}
489+
bootstrapcomponents-typeahead input.bts-typeahead.showAsCombo {
490+
cursor: pointer;
491+
}
492+
bootstrapcomponents-typeahead:has(input.showAsCombo:not(:disabled):not([readonly]))::after {
493+
content: "";
494+
display: block;
495+
position: absolute;
496+
right: 12px;
497+
top: 50%;
498+
transform: translateY(-50%);
499+
border-top: 0.3em solid;
500+
border-right: 0.3em solid transparent;
501+
border-bottom: 0;
502+
border-left: 0.3em solid transparent;
503+
pointer-events: none;
480504
}

components/typeahead/typeahead.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"editable" : { "type": "protected", "blockingOn": false, "default": true,"for": ["dataProviderID","onDataChangeMethodID"] },
1818
"findmode" : { "type":"findmode", "tags":{"scope":"private"}},
1919
"size" : {"type" :"dimension", "default" : {"width":140, "height":30}},
20-
"styleClass" : { "type" :"styleclass", "tags": { "scope" :"design", "doc": "Set the styleclasses that should be applied at to this component" }, "default" : "form-control"},
20+
"styleClass" : { "type" :"styleclass", "tags": { "scope" :"design", "doc": "Set the styleclasses that should be applied at to this component" }, "default" : "form-control", "values": ["form-control", "showAsCombo"]},
2121
"placeholderText" : "tagstring",
2222
"valuelistID" : { "type" : "valuelist", "tags": {"logWhenOverMax": false, "basic": true}, "for": "dataProviderID","config": "valuelistConfig", "default":"autoVL", "pushToServer": "allow", "max":100},
2323
"valuelistConfig" : { "type" : "valuelistConfig"},

0 commit comments

Comments
 (0)