diff --git a/docs/angular/src/content/en/components/toc.json b/docs/angular/src/content/en/components/toc.json index 2aeb60fabf..02fc278ae0 100644 --- a/docs/angular/src/content/en/components/toc.json +++ b/docs/angular/src/content/en/components/toc.json @@ -1321,9 +1321,12 @@ }, { "name": "Combo", - "href": "inputs/combo/overview.mdx", - "updated": true, "items": [ + { + "name": "Overview", + "href": "inputs/combo/overview.mdx", + "updated": true + }, { "name": "Features", "href": "inputs/combo/features.mdx", diff --git a/docs/angular/src/content/en/images/combo/combo-do-1.png b/docs/angular/src/content/en/images/combo/combo-do-1.png index 2577ce75ee..5926575721 100644 Binary files a/docs/angular/src/content/en/images/combo/combo-do-1.png and b/docs/angular/src/content/en/images/combo/combo-do-1.png differ diff --git a/docs/angular/src/content/en/images/combo/combo-do-not-1.png b/docs/angular/src/content/en/images/combo/combo-do-not-1.png index 29070f1593..83a7242721 100644 Binary files a/docs/angular/src/content/en/images/combo/combo-do-not-1.png and b/docs/angular/src/content/en/images/combo/combo-do-not-1.png differ diff --git a/docs/xplat/src/assets/images/combo/combo-do-1.png b/docs/xplat/src/assets/images/combo/combo-do-1.png index 2577ce75ee..5926575721 100644 Binary files a/docs/xplat/src/assets/images/combo/combo-do-1.png and b/docs/xplat/src/assets/images/combo/combo-do-1.png differ diff --git a/docs/xplat/src/assets/images/combo/combo-do-not-1.png b/docs/xplat/src/assets/images/combo/combo-do-not-1.png index 29070f1593..83a7242721 100644 Binary files a/docs/xplat/src/assets/images/combo/combo-do-not-1.png and b/docs/xplat/src/assets/images/combo/combo-do-not-1.png differ diff --git a/docs/xplat/src/content/en/components/inputs/combo/overview.mdx b/docs/xplat/src/content/en/components/inputs/combo/overview.mdx index e8bf151467..1177b047c7 100644 --- a/docs/xplat/src/content/en/components/inputs/combo/overview.mdx +++ b/docs/xplat/src/content/en/components/inputs/combo/overview.mdx @@ -153,7 +153,7 @@ Install the **{PackageCommon}** package: npm install {PackageCommon} ``` -Then import the , its theme CSS, and register the component. The registration also registers the input, icon, and popover elements that the Combo renders: +Then import the , its theme CSS, and register the component. The registration also registers the input, icon, checkbox, and popover elements that the Combo renders: ```ts import { defineComponents, IgcComboComponent } from 'igniteui-webcomponents'; @@ -293,20 +293,23 @@ const cities = [ Use the {Platform} Combo when users pick one or more options from a long list and need to search it, such as a list of cities or countries. -### Type +### Type (Material Theme) -The Combo Input provides selection between a border type for a more structured perception on solid color backgrounds, and a boxed type that is most appropriate when placed on top of a vivid image to improve readability. +In the Material theme, the Combo Input provides selection between a border type for a more structured perception on solid color backgrounds, and a boxed type that is most appropriate when placed on top of a vivid image to improve readability. The Bootstrap, Fluent, and Indigo themes draw both types the same way, so the other samples of this topic show the box type only in the Material theme. -The {Platform} Combo uses the box type by default. Set `outlined` for the border type. The box type is a style of the Material theme: in the Bootstrap, Fluent, and Indigo themes, both types look the same. +The {Platform} Combo uses the box type by default. Set `outlined` for the border type: ```html + + + ``` @@ -315,7 +318,10 @@ The {Platform} Combo uses the box type by default. Set `outlined` for the border ```tsx +{/* Border type */} + +{/* Box type */} ``` @@ -324,7 +330,10 @@ The {Platform} Combo uses the box type by default. Set `outlined` for the border ```razor +@* Border type *@ + +@* Box type *@ ``` @@ -335,11 +344,13 @@ The {Platform} Combo uses the box type by default. Set `outlined` for the border The Angular Combo uses the box type by default. Set the input to `border` for the border type. Add the label with the `igxLabel` directive and the left icon with an `igx-prefix`: ```html + language + @@ -355,13 +366,13 @@ Add the label with the `label` property, and the left icon in the `prefix` slot. - + - + @@ -403,13 +414,13 @@ Set `disabled` on the {Platform} Combo to show the disabled state of both the bo - + - + @@ -435,13 +446,13 @@ The {Platform} Combo is medium by default. - + - + @@ -468,9 +479,11 @@ await combo.toggle(); ```tsx const comboRef = useRef(null); -comboRef.current.show(); -comboRef.current.hide(); -comboRef.current.toggle(); +const open = () => comboRef.current?.show(); +const close = () => comboRef.current?.hide(); +const toggle = () => comboRef.current?.toggle(); + +return ; ``` @@ -502,17 +515,17 @@ public openCombo(): void { -The following sample shows the states side by side. Because hover and focus come from the pointer and the keyboard, the sample styles the display-only combos for these states with CSS classes. +The following sample shows the states side by side. Hover and focus come from the pointer and the keyboard, so the sample turns on the hover and the focus styles of the theme for its display-only combos. - + - + @@ -522,7 +535,7 @@ Every experienced designer uses constraints wisely to limit the user input and a -The {Platform} Combo is form-associated. Set `required` to require at least one selected item, and `invalid` to show the error state. Put the guidance or the error message in the `helper-text` slot. The Combo also exposes the `checkValidity`, `reportValidity`, and `setCustomValidity` methods of the constraint validation API. The Combo has no built-in success or warn state, so the sample styles these two states with CSS classes. +The {Platform} Combo is form-associated. Set `required` to require at least one selected item, and `invalid` to show the error state. Put the guidance or the error message in the `helper-text` slot. The Combo also exposes the `checkValidity`, `reportValidity`, and `setCustomValidity` methods of the constraint validation API. The Combo has no built-in success or warn state. The sample shows the success and the warn states as invalid Combos that take the success or the warning color of the theme in place of the error color. @@ -558,7 +571,7 @@ The {Platform} Combo is form-associated. Set `required` to require at least one -The Angular Combo takes its validation state from the form control that it is bound to, through `ngModel` or a reactive form. Set the property to an `IgxInputState` value to set the state in code. Put the guidance or the error message in an `igx-hint`: +The Angular Combo takes its validation state from the form control that it is bound to, through `ngModel` or a reactive form. Set the property to an `IgxInputState` value to set the state in code. The Angular Combo has no warn state of its own, so the sample shows it with the warning style of its input group. Put the guidance or the error message in an `igx-hint`: ```html @@ -570,13 +583,13 @@ The Angular Combo takes its validation state from the form control that it is bo - + - + @@ -598,13 +611,13 @@ The following sample shows the dropdowns only, without their input fields. - + - + @@ -652,27 +665,27 @@ combo.filteringOptions = { filterKey: 'name', caseSensitive: false, matchDiacrit -Set the text of the empty search input with , show a button that toggles case-sensitive filtering with , and hide the search input with . The input sets the key that the search filters by and whether the filtering is case-sensitive: +Set the text of the empty search input with the `igx_combo_filter_search_placeholder` entry of , show a button that toggles case-sensitive filtering with , and hide the search input with . The input sets the key that the search filters by and whether the filtering is case-sensitive: ```html - ``` -The following sample shows the search input only. Because its states come from the pointer and the keyboard, the sample styles the display-only search inputs with CSS classes. +The following sample shows the search input only. Hover and focus come from the pointer and the keyboard, so the sample turns on the hover and the focus styles of the theme for its display-only search inputs. - + - + @@ -720,7 +733,7 @@ The {Platform} Combo exposes its selected items through its value, and methods t -The `value` holds the selected items as their `valueKey` values, or as object references when there is no `valueKey`. Set it to select items when the Combo first renders. The `select` and `deselect` methods take an array of items; called without items, they select or deselect all items: +The `value` holds the selected items as their `valueKey` values, or as object references when there is no `valueKey`. Set it to select items when the Combo first renders. The `select` and `deselect` methods take an array of items; with an empty array, they select or deselect all items: @@ -744,14 +757,14 @@ console.log(combo.value); // the ids of the selected items ```tsx // select and deselect items by their ids, because the valueKey is 'id' -comboRef.current.select(['BG01', 'BG02']); -comboRef.current.deselect(['BG01']); +comboRef.current?.select(['BG01', 'BG02']); +comboRef.current?.deselect(['BG01']); // select and deselect all items -comboRef.current.select([]); -comboRef.current.deselect([]); +comboRef.current?.select([]); +comboRef.current?.deselect([]); -console.log(comboRef.current.value); // the ids of the selected items +console.log(comboRef.current?.value); // the ids of the selected items ``` @@ -760,7 +773,7 @@ console.log(comboRef.current.value); // the ids of the selected items ```razor @code { - private IgbCombo Combo; + private IgbCombo Combo; public void SelectCities() => Combo.Select(new object[] { "BG01", "BG02" }); @@ -892,7 +905,7 @@ The {Platform} Combo exposes the following properties. See the API reference for | | `string` | — | The field that groups the options. | | | `IgxInputGroupType` | `'box'` | The type of the input field: `box`, `border`, or `line`. | | | `string` | — | The text that the input field shows when no item is selected. | -| | `string` | — | The text that the empty search input shows. | +| | `IComboResourceStrings` | — | The texts of the Combo, including the one that the empty search input shows. | | | `boolean` | `false` | Whether the Combo is disabled. | | | `boolean` | `false` | Whether the search input is hidden. | | | `boolean` | `false` | Whether the search input shows the button that toggles case-sensitive filtering. | @@ -1298,7 +1311,7 @@ Infragistics documents {ProductName} accessibility support for Section 508 and W Your responsibilities: -- Give every Combo a label that names what users select. See [Type](#type). +- Give every Combo a label that names what users select. See [Type](#type-material-theme). - When you override the theme colors, keep a contrast ratio of at least 3:1 for the borders and the focus indicator, as [1.4.11 Non-text Contrast](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast) requires. - Show the error message in the helper text, not by color alone. See [Validation States](#validation-states). @@ -1408,7 +1421,7 @@ These questions cover common {Platform} Combo setup, selection, and usage scenar Bind the Angular Combo with `[(ngModel)]` or a form control to an array of `valueKey` values, or call the `select` method with the items. Without a `valueKey`, the Angular Combo uses references to the objects in its `data`.Set the `value` of the {Platform} Combo to an array of `valueKey` values, or call the `select` method with the items. Without a `valueKey`, the {Platform} Combo uses references to the objects in its `data`. - The Angular Combo always allows multiple selection. Use the Simple Combo when users must select a single item; it also lets users type in the input field to filter the list.Yes. Set `singleSelect` on the {Platform} Combo, and users select one item and filter the list from the input field instead of the search input. See the Single Selection topic. + The Angular Combo always allows multiple selection. Use the Simple Combo when users must select a single item; it also lets users type in the input field to filter the list.Yes. Set `singleSelect` on the {Platform} Combo, and users select one item and filter the list from the input field instead of the search input. See the [Single Selection](./single-selection.mdx) topic. Set the `groupKey` of the {Platform} Combo to the field that holds the group of each option. The {Platform} Combo shows a header for each group and sorts the groups. diff --git a/docs/xplat/src/content/en/toc.json b/docs/xplat/src/content/en/toc.json index ed405d1b9e..4a87c7141a 100644 --- a/docs/xplat/src/content/en/toc.json +++ b/docs/xplat/src/content/en/toc.json @@ -3394,9 +3394,15 @@ }, { "name": "Combo", - "href": "inputs/combo/overview.mdx", - "updated": true, "items": [ + { + "name": "Overview", + "href": "inputs/combo/overview.mdx", + "updated": true, + "include": [ + "Web" + ] + }, { "name": "Features", "href": "inputs/combo/features.mdx",