Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
joakbjerk committed Sep 24, 2024
1 parent f7ef629 commit d0f553a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ You may check out the [DrawerList Properties](#drawerlist-properties) down below
| `innerRef` | _(optional)_ by providing a React.ref you can get the internally used main element (DOM). E.g. `innerRef={myRef}` by using `React.createRef()` or `React.useRef()`. |
| `buttonRef` | _(optional)_ by providing a React.ref you can get the internally used button element (DOM). E.g. `buttonRef={myRef}` by using `React.createRef()` or `React.useRef()`. |
| `skeleton` | _(optional)_ if set to `true`, an overlaying skeleton with animation will be shown. |
| `keepSelectIndexOnDataChange` | _(optional)_ Determines if the selection index should be retained between `data` changes or not. Defaults to `false` |
| [DrawerList](/uilib/components/fragments/drawer-list/properties) | _(optional)_ all DrawerList properties. |
| [Space](/uilib/layout/space/properties) | _(optional)_ spacing properties like `top` or `bottom` are supported. |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ export interface AutocompleteProps {
* Define a custom class for the internal drawer-list. This makes it possible more easily customize the drawer-list style with styled-components and the `css` style method. Defaults to `null`.
*/
drawer_class?: string;
/**
* Determines if the selection index should retain between `data` changes or not. Default: `false`
*/
keepSelectIndexOnDataChange?: boolean;
on_type?: (...args: any[]) => any;
on_focus?: (...args: any[]) => any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ export const autocompleteProperties: PropertiesTableProps = {
type: ['string', 'React.Element'],
status: 'optional',
},
keepSelectIndexOnDataChange: {
doc: 'Determines if the selection index should be retained between `data` changes or not. Defaults to `false`',
type: 'boolean',
status: 'optional',
},
'[DrawerList](/uilib/components/fragments/drawer-list/properties)': {
doc: 'all DrawerList properties.',
type: 'Various',
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/dropdown/Dropdown.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export interface DropdownProps {
on_show_focus?: (...args: any[]) => any;
on_hide_focus?: (...args: any[]) => any;
/**
* Resets the select index when data prop changes
* Determines if the selection index should retain between `data` changes or not. Default: `false`
*/
keepSelectIndexOnDataChange?: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ export interface DrawerListProps {
on_resize?: (...args: any[]) => any;
on_select?: (...args: any[]) => any;
on_state_update?: (...args: any[]) => any;
/**
* Determines if the selection index should retain between `data` changes or not. Default: `false`
*/
keepSelectIndexOnDataChange?: boolean;
}
export type DrawerListOptionsProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ export const DrawerListProperties: PropertiesTableProps = {
type: 'function',
status: 'optional',
},
keepSelectIndexOnDataChange: {
doc: 'Determines if the selection index should be retained between `data` changes or not. Defaults to `false`',
type: 'boolean',
status: 'optional',
},
'[Space](/uilib/layout/space/properties)': {
doc: 'Spacing properties like `top` or `bottom` are supported.',
type: ['string', 'object'],
Expand Down

0 comments on commit d0f553a

Please sign in to comment.