Skip to content

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Aug 12, 2022

Bumps @aws-amplify/ui-react from 1.2.5 to 3.4.0.

Release notes

Sourced from @​aws-amplify/ui-react's releases.

@​aws-amplify/ui-react@​3.4.0

Minor Changes

  • #2300 eae79ae15 Thanks @​zchenwei! - feat: adding indeterminate state checkbox

    Users can create an indeterminate CheckboxField by setting isIndeterminate prop to true.

    Example

    import * as React from 'react';
    import { CheckboxField, Flex, View } from '@​aws-amplify/ui-react';
    export const CheckboxFieldIndeterminateExample = () => {
    const [checkedItems, setCheckedItems] = React.useState([false, false]);
    const checkedItemsRef = React.useRef(null);
    const allChecked = checkedItems.every(Boolean);
    const isIndeterminate = checkedItems.some(Boolean) && !allChecked;
    if (isIndeterminate) {
    checkedItemsRef.current = [...checkedItems];
    }
    const handleAllPetsChange = () => {
    if (isIndeterminate) {
    setCheckedItems([true, true]);
    } else if (allChecked) {
    setCheckedItems([false, false]);
    } else if (checkedItemsRef.current) {
    setCheckedItems(checkedItemsRef.current);
    } else {
    setCheckedItems([true, true]);
    }
    };
    const handleCatChange = (e) => {
    const newCheckedItems = [e.target.checked, checkedItems[1]];
    if (!newCheckedItems.some(Boolean) || newCheckedItems.every(Boolean)) {
    checkedItemsRef.current = null;
    }
    setCheckedItems(newCheckedItems);
    };
    const handleDogChange = (e) => {
    const newCheckedItems = [checkedItems[0], e.target.checked];
    if (!newCheckedItems.some(Boolean) || newCheckedItems.every(Boolean)) {
    checkedItemsRef.current = null;
    }
    setCheckedItems(newCheckedItems);
    };

... (truncated)

Changelog

Sourced from @​aws-amplify/ui-react's changelog.

3.4.0

Minor Changes

  • #2300 eae79ae15 Thanks @​zchenwei! - feat: adding indeterminate state checkbox

    Users can create an indeterminate CheckboxField by setting isIndeterminate prop to true.

    Example

    import * as React from 'react';
    import { CheckboxField, Flex, View } from '@​aws-amplify/ui-react';
    export const CheckboxFieldIndeterminateExample = () => {
    const [checkedItems, setCheckedItems] = React.useState([false, false]);
    const checkedItemsRef = React.useRef(null);
    const allChecked = checkedItems.every(Boolean);
    const isIndeterminate = checkedItems.some(Boolean) && !allChecked;
    if (isIndeterminate) {
    checkedItemsRef.current = [...checkedItems];
    }
    const handleAllPetsChange = () => {
    if (isIndeterminate) {
    setCheckedItems([true, true]);
    } else if (allChecked) {
    setCheckedItems([false, false]);
    } else if (checkedItemsRef.current) {
    setCheckedItems(checkedItemsRef.current);
    } else {
    setCheckedItems([true, true]);
    }
    };
    const handleCatChange = (e) => {
    const newCheckedItems = [e.target.checked, checkedItems[1]];
    if (!newCheckedItems.some(Boolean) || newCheckedItems.every(Boolean)) {
    checkedItemsRef.current = null;
    }
    setCheckedItems(newCheckedItems);
    };
    const handleDogChange = (e) => {
    const newCheckedItems = [checkedItems[0], e.target.checked];
    if (!newCheckedItems.some(Boolean) || newCheckedItems.every(Boolean)) {
    checkedItemsRef.current = null;
    }
    setCheckedItems(newCheckedItems);

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@aws-amplify/ui-react](https://github.com/aws-amplify/amplify-ui/tree/HEAD/packages/react) from 1.2.5 to 3.4.0.
- [Release notes](https://github.com/aws-amplify/amplify-ui/releases)
- [Changelog](https://github.com/aws-amplify/amplify-ui/blob/main/packages/react/CHANGELOG.md)
- [Commits](https://github.com/aws-amplify/amplify-ui/commits/@aws-amplify/[email protected]/packages/react)

---
updated-dependencies:
- dependency-name: "@aws-amplify/ui-react"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Aug 12, 2022
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Aug 17, 2022

Superseded by #73.

@dependabot dependabot bot closed this Aug 17, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/aws-amplify/ui-react-3.4.0 branch August 17, 2022 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants