Skip to content

Commit

Permalink
feat(table): fix code smell error
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhigarg-bmw committed Apr 29, 2024
1 parent 639b9d8 commit aa239cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { ViewSelector } from '../../../ViewSelector'
import type { View } from '../../../ViewSelector'
import { Typography } from '../../../Typography'
import type { SelectedFilter } from './UltimateToolbar'
import { SortOption } from '../../../SortOption'
import { SortOption, type SortOptionsType } from '../../../SortOption'
import SortImage from './SortImage'

export interface SearchAndFilterButtonToolbarProps extends ToolbarProps {
Expand All @@ -38,7 +38,7 @@ export interface SearchAndFilterButtonToolbarProps extends ToolbarProps {
defaultFilter?: string
onFilter?: (selectedFilter: SelectedFilter) => void
defaultSortOption?: string
sortOptions?: { label: string, value: string }[]
sortOptions?: SortOptionsType[]
onSortClick?: (value: string) => void
descriptionText?: string
autoFocus?: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface SortIconProps {
selected?: boolean
}

export default function SortImage({ onClick, selected }: SortIconProps) {
export default function SortImage({ onClick, selected }: Readonly<SortIconProps>) {
return (
<Box
sx={{
Expand Down
3 changes: 2 additions & 1 deletion src/components/basic/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { Typography } from '../Typography'
import { Error500Overlay } from './components/Error/Error500Overlay'
import { Error400Overlay } from './components/Error/Error400Overlay'
import type { View } from '../ViewSelector'
import { type SortOptionsType } from '../SortOption'

export { StatusTag }
export type toolbarType = 'basic' | 'premium' | 'ultimate' | 'searchAndFilter'
Expand Down Expand Up @@ -68,7 +69,7 @@ export interface TableProps extends DataGridProps {
defaultFilter?: string
filterViews?: View[]
defaultSortOption?: string
sortOptions?: {label: string, value: string}[]
sortOptions?: SortOptionsType[]
onSortClick?: (value: string) => void
alignCell?: string
error?: {
Expand Down

0 comments on commit aa239cf

Please sign in to comment.