using webpack dev server
This commit is contained in:
@@ -26,7 +26,7 @@ export class LexEdit extends React.Component<any, any> {
|
||||
let defaultText = _.get<any>(li, lens, '');
|
||||
let originalText = _.get<any>(this.props.lexItem, lens, '');
|
||||
let options = this.props.fieldMetaMap[field].options;
|
||||
let changed = defaultText !== originalText;
|
||||
let changed = defaultText !== originalText && this.props.existing;
|
||||
// console.log('changed:',changed);
|
||||
let sh = (e: any) => {
|
||||
let eventData = {};
|
||||
@@ -54,11 +54,13 @@ export class LexEdit extends React.Component<any, any> {
|
||||
<Button
|
||||
floated="right"
|
||||
icon="download"
|
||||
size="tiny"
|
||||
onClick={(e, d) => this.handleOnLoad(d)}
|
||||
/>
|
||||
<Button
|
||||
floated="right"
|
||||
icon="undo"
|
||||
size="tiny"
|
||||
onClick={(e, d) => this.handleOnUndo(d)}
|
||||
/>
|
||||
</Card.Header>
|
||||
@@ -89,7 +91,7 @@ export class LexEdit extends React.Component<any, any> {
|
||||
this.setState({ lexItem });
|
||||
}
|
||||
private handleOnLoad(event: any) {
|
||||
// this.props.load()
|
||||
// this.props.load(this.state.lexItem)
|
||||
console.log('loading from server');
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ class LexSearch extends React.Component<any, any> {
|
||||
placeholder="Search input"
|
||||
dir="auto"
|
||||
value={this.props.searchState.searchValue}
|
||||
icon="filter"
|
||||
onChange={(e, d) => this.handleChange(d, false)}
|
||||
/>
|
||||
</div>
|
||||
@@ -86,7 +87,7 @@ function LexMatches(params: any) {
|
||||
key={uniqueKey}
|
||||
lexItem={mObj}
|
||||
selectionMeta={props.selectionMeta}
|
||||
new_entry={false}
|
||||
existing={true}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@@ -98,7 +99,7 @@ function LexMatches(params: any) {
|
||||
key={props.searchText}
|
||||
lexItem={addProps}
|
||||
selectionMeta={props.selectionMeta}
|
||||
new_entry={true}
|
||||
existing={false}
|
||||
/>
|
||||
);
|
||||
editEntries.push(addEntry);
|
||||
|
||||
Reference in New Issue
Block a user