Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NDS-758 & NDS-772] select option click handler not triggered & Table documentation [v4] #659

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,11 @@ const Select = React.forwardRef<HTMLInputElement, Props & InputProps & TestProps
const isEnter = event.key === 'Enter';

if (hasNoOptionsAndIsCreatable && isEnter) {
handleMultiSelectOptionClick(filteredOptions[0]);
const selectedOption = filteredOptions[0];

handleMultiSelectOptionClick(selectedOption);
setSearchValue('');
handleSelectedOption(selectedOption);
}
};

Expand Down
13 changes: 13 additions & 0 deletions src/components/Table/Table.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ import { Table } from '@orfium/ictinus';

<Props of={Table} />

### Disclaimer

In case of importing data produced using useMemo or external const, follow this pattern:

```js
import { Row } from '@orfium/ictinus/dist/components/Table/Table';
...
const data: Row<DataType> = useMemo(() => {}, []);
//or other types of data
```

Where Row is the type from the Table, so you must import it from there.

# Regular Table

Regular Table with simple rows
Expand Down