Skip to content

Commit 6e40d54

Browse files
committed
Revert "[REVERT] Add story for smoke testing"
This reverts commit 23d9e8b.
1 parent 8b1df72 commit 6e40d54

1 file changed

Lines changed: 0 additions & 58 deletions

File tree

packages/eui/src/components/basic_table/in_memory_table.stories.tsx

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -250,61 +250,3 @@ export const KitchenSink: Story = {
250250
<EuiInMemoryTable {...args} />
251251
),
252252
};
253-
254-
// TODO revert - only for smoke testing
255-
export const ControlledText: Story = {
256-
parameters: {
257-
controls: {
258-
include: ['searchFormat', 'search'],
259-
},
260-
},
261-
args: {
262-
tableCaption: 'Controlled text',
263-
items: users,
264-
itemId: 'id',
265-
rowHeader: 'firstName',
266-
columns,
267-
pagination: {
268-
initialPageSize: 5,
269-
pageSizeOptions: [3, 5, 8],
270-
},
271-
searchFormat: 'text',
272-
sorting: {
273-
sort: {
274-
field: 'lastName',
275-
direction: 'asc' as const,
276-
},
277-
},
278-
selection: {
279-
selectable: (user) => user.online,
280-
selectableMessage: (selectable) =>
281-
!selectable ? 'User is currently offline' : '',
282-
},
283-
},
284-
// Don't pass the default Storybook action listener for `onChange`,
285-
// or the automatic uncontrolled pagination & sorting won't work
286-
render: ({ onChange, ...args }: EuiInMemoryTableProps<User>) => (
287-
<StatefulPlayground {...args} />
288-
),
289-
};
290-
291-
const StatefulPlayground = (props: EuiInMemoryTableProps<User>) => {
292-
const { search, ...rest } = props;
293-
// `search` could be boolean
294-
const _search = typeof search === 'object' ? search : {};
295-
const [query, setQuery] = React.useState(() => _search.query ?? '');
296-
297-
return (
298-
<EuiInMemoryTable
299-
{...rest}
300-
search={{
301-
query,
302-
..._search,
303-
box: { incremental: true },
304-
onChange: ({ queryText }) => {
305-
setQuery(queryText);
306-
},
307-
}}
308-
/>
309-
);
310-
};

0 commit comments

Comments
 (0)