Skip to content

Commit 6557b89

Browse files
committed
Search text fixes
1 parent fc2e29f commit 6557b89

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

angular-semantic-ui.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,7 @@
23252325
/* Required */
23262326
model: '=',
23272327
/* Optional */
2328-
text: '=',
2328+
text: '=?',
23292329
icon: '@',
23302330
placeholder: '@',
23312331
category: '@',
@@ -2371,6 +2371,11 @@
23712371
SemanticUI.onEvent( settings, 'onSelect',
23722372
function(result, response) {
23732373
modelWatcher.set( result );
2374+
if ( attributes.text ) {
2375+
scope.$evalAsync(function() {
2376+
scope.text = result.title;
2377+
});
2378+
}
23742379
}
23752380
);
23762381

angular-semantic-ui.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular-semantic-ui.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/search/sm-search.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
/* Required */
4040
model: '=',
4141
/* Optional */
42-
text: '=',
42+
text: '=?',
4343
icon: '@',
4444
placeholder: '@',
4545
category: '@',
@@ -85,6 +85,11 @@
8585
SemanticUI.onEvent( settings, 'onSelect',
8686
function(result, response) {
8787
modelWatcher.set( result );
88+
if ( attributes.text ) {
89+
scope.$evalAsync(function() {
90+
scope.text = result.title;
91+
});
92+
}
8893
}
8994
);
9095

0 commit comments

Comments
 (0)