-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: sort table by visible text (#1205)
**Issue number:** [ADDON-59778](https://splunk.atlassian.net/browse/ADDON-59778) ## Summary [UCC UI] Add support for sorting functionality when custom mapping is used in global config file ### Changes Sorting functionality works on mapped text not on keys. ### User experience Right now if user will sort by mapped property it will be displayed correctly. ## Checklist If your change doesn't seem to apply, please leave them unchecked. * [x] I have performed a self-review of this change * [x] Changes have been tested * [ ] Changes are documented * [x] PR title follows [conventional commit semantics](https://www.conventionalcommits.org/en/v1.0.0/) --------- Co-authored-by: srv-rr-github-token <[email protected]>
- Loading branch information
1 parent
3be8d48
commit 8561e0f
Showing
9 changed files
with
1,152 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { fn } from '@storybook/test'; | ||
|
||
import { setUnifiedConfig } from '../../../util/util'; | ||
import { GlobalConfig } from '../../../types/globalConfig/globalConfig'; | ||
import TableWrapper, { ITableWrapperProps } from '../TableWrapper'; | ||
import { getSimpleConfig } from './configMockups'; | ||
import { TableContextProvider } from '../../../context/TableContext'; | ||
import { ServerHandlers } from './rowDataMockup'; | ||
|
||
interface ITableWrapperStoriesProps extends ITableWrapperProps { | ||
config: GlobalConfig; | ||
} | ||
|
||
const meta = { | ||
title: 'TableWrapper', | ||
render: (props) => { | ||
setUnifiedConfig(props.config); | ||
return ( | ||
<TableContextProvider> | ||
{(<TableWrapper {...props} />) as unknown as Node} | ||
</TableContextProvider> | ||
); | ||
}, | ||
} satisfies Meta<ITableWrapperStoriesProps>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const OuathBasic: Story = { | ||
args: { | ||
page: 'configuration', | ||
serviceName: 'account', | ||
handleRequestModalOpen: fn(), | ||
handleOpenPageStyleDialog: fn(), | ||
displayActionBtnAllRows: false, | ||
config: getSimpleConfig() as GlobalConfig, | ||
}, | ||
parameters: { | ||
msw: { | ||
handlers: ServerHandlers, | ||
}, | ||
}, | ||
}; |
3 changes: 3 additions & 0 deletions
3
ui/src/components/table/stories/__images__/TableWrapper-ouath-basic-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.