Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
junaidbhura authored Mar 1, 2019
1 parent 51c50b8 commit 0cf6ce3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ attributes: {

### SelectImage

![select-image](https://user-images.githubusercontent.com/2512525/52124683-f41dc200-2679-11e9-8466-485d7e4b7d27.gif)
![select-image](https://user-images.githubusercontent.com/2512525/53619432-5220d380-3c3f-11e9-8a93-d0504d9fc9ee.gif)

#### Example

Expand All @@ -141,6 +141,9 @@ attributes: {
image={ image }
placeholder="Choose an image"
size="full"
onChange={ image => setAttributes( { image } ) }
onChange={ ( image, media ) => {
setAttributes( { image: null } ); // The block editor doesn't update objects correctly? 🤷‍♂️
setAttributes( { image } );
} }
/>
```

0 comments on commit 0cf6ce3

Please sign in to comment.