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

fix(useTable): sort should adapt to enhanced row types #25487

Merged
merged 3 commits into from
Nov 2, 2022

Conversation

ling1726
Copy link
Member

@ling1726 ling1726 commented Nov 2, 2022

Current Behavior

const rows = sort(getRows(row) => ({...row, foo: 'foo'}))

// Error - `foo` does not exist on row
console.log(rows[0].foo)

New Behavior

const rows = sort(getRows(row) => ({...row, foo: 'foo'}))

// Supports TS intellisense
console.log(rows[0].foo)

```ts
const rows = sort(getRows(row) => ({...row, foo: 'foo'}))

// Error!
console.log(rows[0].foo)
```
@size-auditor
Copy link

size-auditor bot commented Nov 2, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: e807070d2060f0003f69705b06784cd678285e5e (build)

@fabricteam
Copy link
Collaborator

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
62.94 kB
17.663 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
189.906 kB
52.963 kB
react-components
react-components: FluentProvider & webLightTheme
33.446 kB
11.033 kB
react-portal-compat
PortalCompatProvider
5.857 kB
1.978 kB
🤖 This report was generated against e807070d2060f0003f69705b06784cd678285e5e

@ling1726 ling1726 enabled auto-merge (squash) November 2, 2022 12:21
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 2, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f1853a1:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1297 1287 5000
Button mount 922 932 5000
FluentProvider mount 1464 1489 5000
FluentProviderWithTheme mount 588 577 10
FluentProviderWithTheme virtual-rerender 525 540 10
FluentProviderWithTheme virtual-rerender-with-unmount 576 571 10
MakeStyles mount 1963 1967 50000
SpinButton mount 2316 2341 5000

@ling1726 ling1726 merged commit 072f041 into microsoft:master Nov 2, 2022
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Nov 2, 2022
* master: (23 commits)
  fix(docsite-v9): move theme picker under component title so it can be visible on embedded pages (microsoft#25385)
  applying package updates
  feat: Implement child render function for DataGrid rows (microsoft#25476)
  fix(useTable): sort should adapt to enhanced row types (microsoft#25487)
  applying package updates
  feat: positioning should happen out of React lifecycle (microsoft#25456)
  applying package updates
  chore(react-link): migrate to new package structure (microsoft#25471)
  chore(react-input): migrate to new package structure (microsoft#25469)
  fix glob pattern for syncpack (microsoft#25465)
  chore(react-label): migrate to new package structure (microsoft#25470)
  chore: bump Griffel to latest (microsoft#25412)
  chore: add few small toolbar improvements (microsoft#25468)
  docs: fix small typos (microsoft#25464)
  chore: fix dependencies in @fluentui/react-toolbar (microsoft#25466)
  feat: v0 menu style migration from v9 (microsoft#25012)
  applying package updates
  Update List to render children on first render() call (microsoft#25331)
  Scaffold react-skeleton package (microsoft#25435)
  fix(public-docsite): Changing crossplatform urls to use 'cross' instead of 'crossplatform' (microsoft#25437)
  ...
NotWoods pushed a commit to NotWoods/fluentui that referenced this pull request Nov 18, 2022
* fix(useTable): sort should adapt to enhanced row types

```ts
const rows = sort(getRows(row) => ({...row, foo: 'foo'}))

// Error!
console.log(rows[0].foo)
```

* update md

* changefile
Hotell pushed a commit to Hotell/fluentui that referenced this pull request Feb 9, 2023
* fix(useTable): sort should adapt to enhanced row types

```ts
const rows = sort(getRows(row) => ({...row, foo: 'foo'}))

// Error!
console.log(rows[0].foo)
```

* update md

* changefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants