<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<control xmlns="http://www.sap.com/sap.ui.library.xsd">
    <name>TableSelectDialog</name>
    <derived/>
    <author>SAP SE</author>
    <documentation>A dialog to select items in a table containing multiple values and attributes.
&lt;h3&gt;Overview&lt;/h3&gt;
The table select dialog helps users select items in a table-like structure with several attributes and values per item. A search fields helps narrow down the results.
&lt;h3&gt;Structure&lt;/h3&gt;
The table select dialog consists of the following elements:
&lt;ul&gt;
&lt;li&gt; Search field - used to search enter search terms for a specific item.&lt;/li&gt;
&lt;li&gt; Info toolbar (only in multi-select mode) - displays the number of currently selected items.&lt;/li&gt;
&lt;li&gt; Content - the table with the items.&lt;/li&gt;
&lt;li&gt; Footer (optional) - a toolbar for actions.&lt;/li&gt;
&lt;/ul&gt;
Table select dialog supports multi-selection when the &lt;code&gt;multiSelect&lt;/code&gt; property is set.

The selected items can be stored for later editing when the &lt;code&gt;rememberSelections&lt;/code&gt; property is set.
&lt;b&gt;Note:&lt;/b&gt; This property has to be set before the dialog is opened.
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;h4&gt;When to use:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;You need to select one or more items from a comprehensive list that contains multiple attributes or values.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;When not to use:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;You need to select only one item from a predefined list of single-value options. Use the {@link sap.m.Select Select} control instead.&lt;/li&gt;
&lt;li&gt;You need to display complex content without having the user navigate away from the current page or you want to prompt the user for an action. Use the {@link sap.m.Dialog Dialog} control instead.&lt;/li&gt;
&lt;li&gt;You need to select items within a query-based range. Use the {@link https://experience.sap.com/fiori-design-web/value-help-dialog/ Value Help Dialog} control instead.&lt;/li&gt;
&lt;li&gt;You need to filter a set of items without any selection. Use the {@link https://experience.sap.com/fiori-design-web/filter-bar/ Filter Bar} control instead.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Notes:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;The property &lt;code&gt;growing&lt;/code&gt; must not be used together with two-way binding.
&lt;li&gt;When the property &lt;code&gt;growing&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt; (default value), the features &lt;code&gt;selected count&lt;/code&gt; in info bar, &lt;code&gt;search&lt;/code&gt; and &lt;code&gt;select/deselect all&lt;/code&gt;, if present, work only for the currently loaded items.
To make sure that all items in the table are loaded at once and the above features work properly, set the property to &lt;code&gt;false&lt;/code&gt;.
&lt;li&gt;Since version 1.58, the columns headers and the info toolbar are sticky (remain fixed on top when scrolling). This feature is not supported in all browsers.
&lt;li&gt;The TableSelectDialog is usually displayed at the center of the screen. Its size and position can be changed by the user.
To enable this you need to set the &lt;code&gt;resizable&lt;/code&gt; and &lt;code&gt;draggable&lt;/code&gt; properties. Both properties are available only in desktop mode.&lt;/li&gt;
For more information on browser support limitations, you can refer to the {@link sap.m.ListBase sap.m.ListBase} &lt;code&gt;sticky&lt;/code&gt; property.
&lt;/ul&gt;
&lt;h3&gt;Responsive Behavior&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;On smaller screens, the columns of the table wrap and build a list that shows all the information.&lt;/li&gt;
&lt;/ul&gt;</documentation>
    <since>1.16</since>
    <baseType>sap.ui.core/Control</baseType>
    <properties>
        <property name="title" type="sap.ui.core/string" group="Appearance">
            <documentation>Specifies the title text in the dialog header.</documentation>
        </property>
        <property name="noDataText" type="sap.ui.core/string" group="Appearance">
            <documentation>Specifies the text displayed when the table has no data.</documentation>
        </property>
        <property name="multiSelect" type="sap.ui.core/boolean" defaultValue="false" group="Dimension">
            <documentation>Enables the user to select several options from the table.</documentation>
        </property>
        <property name="growing" type="sap.ui.core/boolean" defaultValue="true" group="Behavior" since="1.56">
            <documentation>Determines the progressive loading. When set to &lt;code&gt;true&lt;/code&gt;, enables the growing feature of the control to load more items by requesting from the bound model.
&lt;b&gt;Note:&lt;/b&gt; This feature only works when an &lt;code&gt;items&lt;/code&gt; aggregation is bound. Growing must not be used together with two-way binding.
&lt;b&gt;Note:&lt;/b&gt; If the property is set to true, the features &lt;code&gt;selected count&lt;/code&gt; in info bar, &lt;code&gt;search&lt;/code&gt; and &lt;code&gt;select/deselect all&lt;/code&gt;, if present, work only for the currently loaded items.
To make sure that all items in the table are loaded at once and the above features work properly, we recommend setting the &lt;code&gt;growing&lt;/code&gt; property to false.</documentation>
        </property>
        <property name="growingThreshold" type="sap.ui.core/int" group="Misc">
            <documentation>Determines the number of items initially displayed in the table and defines the number of items to be requested from the model for each grow.
This property can only be used if the property &lt;code&gt;growing&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;.</documentation>
        </property>
        <property name="contentWidth" type="sap.ui.core/CSSSize" group="Dimension" since="1.18">
            <documentation>Determines the content width of the inner dialog. For more information, see the Dialog documentation.</documentation>
        </property>
        <property name="rememberSelections" type="sap.ui.core/boolean" defaultValue="false" group="Behavior" since="1.18">
            <documentation>Controls whether the dialog clears the selection or not. When the dialog is opened multiple times in the same context to allow for corrections of previous user inputs, set this flag to "true". When the dialog should reset the selection to allow for a new selection each time set it to "false"
Note: This property must be set before the Dialog is opened to have an effect.</documentation>
        </property>
        <property name="contentHeight" type="sap.ui.core/CSSSize" group="Dimension">
            <documentation>Specifies the content height of the inner dialog. For more information, see the Dialog documentation.</documentation>
        </property>
        <property name="showClearButton" type="sap.ui.core/boolean" defaultValue="false" group="Behavior" since="1.58">
            <documentation>This flag controls whether the Clear button is shown. When set to &lt;code&gt;true&lt;/code&gt;, it provides a way to clear a selection made in Table Select Dialog.

We recommend enabling of the Clear button in the following cases, where a mechanism to clear the value is needed:
In case the Table Select Dialog is in single-selection mode (default mode) and &lt;code&gt;rememberSelections&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;. The Clear button needs to be enabled in order to allow users to clear the selection.
In case of using &lt;code&gt;sap.m.Input&lt;/code&gt; with &lt;code&gt;valueHelpOnly&lt;/code&gt; set to &lt;code&gt;true&lt;/code&gt;, the Clear button can be used for clearing the selection.
In case the application stores a value and uses only Table Select Dialog to edit/maintain it.

Optional:
In case &lt;code&gt;multiSelect&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;, the selection can be easily cleared with one click.

&lt;b&gt;Note:&lt;/b&gt; When used with OData, only the loaded selections will be cleared.</documentation>
        </property>
        <property name="confirmButtonText" type="sap.ui.core/string" group="Appearance" since="1.68">
            <documentation>Overwrites the default text for the confirmation button.</documentation>
        </property>
        <property name="draggable" type="sap.ui.core/boolean" defaultValue="false" group="Behavior" since="1.71">
            <documentation>When set to &lt;code&gt;true&lt;/code&gt;, the TableSelectDialog is draggable by its header. The default value is &lt;code&gt;false&lt;/code&gt;. &lt;b&gt;Note&lt;/b&gt;: The SelectDialog can be draggable only in desktop mode.</documentation>
        </property>
        <property name="resizable" type="sap.ui.core/boolean" defaultValue="false" group="Behavior" since="1.71">
            <documentation>When set to &lt;code&gt;true&lt;/code&gt;, the TableSelectDialog will have a resize handler in its bottom right corner. The default value is &lt;code&gt;false&lt;/code&gt;. &lt;b&gt;Note&lt;/b&gt;: The SelectDialog can be resizable only in desktop mode.</documentation>
        </property>
        <property name="titleAlignment" type="sap.m/TitleAlignment" defaultValue="Auto" group="Misc" since="1.72">
            <documentation>Specifies the Title alignment (theme specific).
If set to &lt;code&gt;TitleAlignment.Auto&lt;/code&gt;, the Title will be aligned as it is set in the theme (if not set, the default value is &lt;code&gt;center&lt;/code&gt;);
Other possible values are &lt;code&gt;TitleAlignment.Start&lt;/code&gt; (left or right depending on LTR/RTL), and &lt;code&gt;TitleAlignment.Center&lt;/code&gt; (centered)</documentation>
        </property>
    </properties>
    <events>
        <event name="confirm" allowPreventDefault="false">
            <documentation>Fires when the dialog is confirmed by selecting an item in single-selection mode or by pressing the confirmation button in multi-selection mode. The items being selected are returned as event parameters.</documentation>
            <parameters>
                <parameter name="selectedItem" type="sap.m/StandardListItem">
                    <documentation>Returns the selected list item. When no item is selected, "null" is returned. When multi-selection is enabled and multiple items are selected, only the first selected item is returned.</documentation>
                </parameter>
                <parameter name="selectedItems" type="sap.m/StandardListItem[]">
                    <documentation>Returns an array containing the visible selected list items. If no items are selected, an empty array is returned.</documentation>
                </parameter>
                <parameter name="selectedContexts" type="sap.ui.core/string">
                    <documentation>Returns the binding contexts of the selected items including the non-visible items.
Note: In contrast to the parameter "selectedItems", this parameter includes the selected but NOT visible items (due to list filtering). An empty array is set for this parameter if no Databinding is used.</documentation>
                </parameter>
            </parameters>
        </event>
        <event name="search" allowPreventDefault="false">
            <documentation>Fires when the search button has been clicked on dialog.</documentation>
            <parameters>
                <parameter name="value" type="sap.ui.core/string">
                    <documentation>Specifies the value entered in the search field.</documentation>
                </parameter>
                <parameter name="itemsBinding" type="sap.ui.core/any">
                    <documentation>Determines the Items binding of the Table Select Dialog. Only available if the items aggregation is bound to a model.</documentation>
                </parameter>
                <parameter name="clearButtonPressed" type="sap.ui.core/boolean" since="1.70">
                    <documentation>Returns if the Clear button is pressed.</documentation>
                </parameter>
            </parameters>
        </event>
        <event name="liveChange" allowPreventDefault="false">
            <documentation>Fires when the value of the search field is changed by a user (for example at each key press).</documentation>
            <parameters>
                <parameter name="value" type="sap.ui.core/string">
                    <documentation>Specifies the value entered in the search field.</documentation>
                </parameter>
                <parameter name="itemsBinding" type="sap.ui.core/any">
                    <documentation>The Items binding of the Table Select Dialog.
Only available if the items aggregation is bound to a model.</documentation>
                </parameter>
            </parameters>
        </event>
        <event name="cancel" allowPreventDefault="false">
            <documentation>Fires when the Cancel button is clicked.</documentation>
        </event>
    </events>
    <aggregations default="items">
        <aggregation name="items" type="sap.m/ColumnListItem" cardinality="0..n" bindable="bindable">
            <documentation>The items of the table.</documentation>
        </aggregation>
        <aggregation name="_dialog" type="sap.ui.core/Control" cardinality="0..1" visibility="hidden">
            <documentation>The internal dialog that is displayed when method open is called.</documentation>
        </aggregation>
        <aggregation name="columns" type="sap.m/Column" cardinality="0..n" bindable="bindable">
            <documentation>The columns bindings.</documentation>
        </aggregation>
    </aggregations>
    <methods>
        <method name="open" type="sap.m/TableSelectDialog">
            <documentation>Opens the internal dialog with a searchfield and a table.</documentation>
            <parameters>
                <parameter name="searchValue" type="sap.ui.core/string">
                    <documentation>Value for the search. The table will be automatically trigger the search event if this parameter is set.</documentation>
                </parameter>
            </parameters>
        </method>
    </methods>
</control>
