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

feat(withTableSettings): add a reset action #1526

Merged
merged 7 commits into from
Apr 26, 2024

Conversation

ArturAbdullin
Copy link
Contributor

Add the reset action to the withTableSettings hoc.

@ArturAbdullin ArturAbdullin requested a review from amje April 19, 2024 14:06
@ArturAbdullin ArturAbdullin requested a review from Raubzeug as a code owner April 19, 2024 14:06
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@ArturAbdullin ArturAbdullin changed the title With table settings/reset action feat(withTableSettings): add a reset action Apr 19, 2024
const WithTableSettingsWithResetTemplate: StoryFn<TableProps<DataItem>> = (args) => {
const [settings, setSettings] = React.useState<TableSettingsData>(DEFAULT_SETTINGS);

const updateSettings = React.useCallback(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't just pass setSettings into the updateSettings prop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. The constant updateSettings is unnecessary here.

Fixed.

@ArturAbdullin ArturAbdullin merged commit 9e93c91 into main Apr 26, 2024
5 checks passed
@ArturAbdullin ArturAbdullin deleted the withTableSettings/reset-action branch April 26, 2024 11:24
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