-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ProtectedFields dialog and enhance Permissions dialogs (#1478)
* chip and multiselect dense variant * autocomplete component * popover refactor, ContextProxy -> portal * add intersection observer component * suggestions for autocomplete * do not show security dialog in edit modal * table will ignore keys when security modal opened * add autocomplete for ACL * add protected fields dialog component * permissioons dialog refactor * add new dialogs to databroowser toolbar * protected fields dialog example * removed comments * fix floating menus - show on top of toolbar * add whitespaces in toolbar menu * use menuitem * trailing newlines * update examples * adds scroll hint * handle case when no fields to protect Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
- Loading branch information
1 parent
69cab35
commit aeeb958
Showing
33 changed files
with
3,667 additions
and
744 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright (c) 2016-present, Parse, LLC | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the license found in the LICENSE file in | ||
* the root directory of this source tree. | ||
*/ | ||
import React from 'react'; | ||
import Autocomplete from 'components/Autocomplete/Autocomplete.react'; | ||
|
||
export const component = Autocomplete; | ||
|
||
class AutocompleteDemo extends React.Component { | ||
constructor() { | ||
super(); | ||
|
||
this.state = { | ||
suggestions: ['aaa', 'abc', 'xxx', 'xyz'] | ||
}; | ||
|
||
this.onSubmit = input => console.log('onSubmit: ' + input); | ||
this.onUserInput = input => { | ||
console.log(`input: ${input}`); | ||
}; | ||
this.buildLabel = input => | ||
input.length > 0 | ||
? `You've typed ${input.length} characters` | ||
: 'Start typing'; | ||
this.buildSuggestions = input => | ||
this.state.suggestions.filter(s => s.startsWith(input)); | ||
} | ||
|
||
render() { | ||
return ( | ||
<Autocomplete | ||
inputStyle={{ | ||
width: '400px', | ||
padding: '0 6px', | ||
margin: '10px 20px' | ||
}} | ||
suggestionsStyle={{ | ||
margin: '-6px 0px 0px 20px', | ||
width: '400px' | ||
}} | ||
locked={true} | ||
onChange={this.onUserInput} | ||
onSubmit={this.onSubmit} | ||
placeholder={'Placeholder'} | ||
buildSuggestions={this.buildSuggestions} | ||
buildLabel={this.buildLabel} | ||
/> | ||
); | ||
} | ||
} | ||
|
||
export const demos = [ | ||
{ | ||
render: () => ( | ||
<div> | ||
<AutocompleteDemo /> | ||
</div> | ||
) | ||
} | ||
]; |
Oops, something went wrong.