Add TabComplete.Entry so we can render images AND text(!) - Add peek() option, all broken.
This commit is contained in:
parent
400b5196bb
commit
41d4c1d14e
4 changed files with 45 additions and 18 deletions
|
@ -1290,7 +1290,7 @@ module.exports = React.createClass({
|
|||
else if (this.tabComplete.isTabCompleting()) {
|
||||
var TabCompleteBar = sdk.getComponent('rooms.TabCompleteBar');
|
||||
statusBar = (
|
||||
<TabCompleteBar />
|
||||
<TabCompleteBar entries={this.tabComplete.peek(3)} />
|
||||
);
|
||||
}
|
||||
else if (this.state.hasUnsentMessages) {
|
||||
|
|
|
@ -31,6 +31,7 @@ var MatrixClientPeg = require("../../../MatrixClientPeg");
|
|||
var SlashCommands = require("../../../SlashCommands");
|
||||
var Modal = require("../../../Modal");
|
||||
var CallHandler = require('../../../CallHandler');
|
||||
var TabComplete = require("../../../TabComplete");
|
||||
var sdk = require('../../../index');
|
||||
|
||||
var dis = require("../../../dispatcher");
|
||||
|
@ -228,7 +229,7 @@ module.exports = React.createClass({
|
|||
}
|
||||
}
|
||||
}).map(function(m) {
|
||||
return m.name || m.userId;
|
||||
return new TabComplete.Entry(m.name || m.userId);
|
||||
});
|
||||
}
|
||||
if (this.props.tabComplete) {
|
||||
|
|
|
@ -22,9 +22,19 @@ var MatrixClientPeg = require("../../../MatrixClientPeg");
|
|||
module.exports = React.createClass({
|
||||
displayName: 'TabCompleteBar',
|
||||
|
||||
propTypes: {
|
||||
entries: React.PropTypes.array.isRequired
|
||||
},
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<div> Tab Complete </div>
|
||||
<div>
|
||||
{this.props.entries.map(function(entry, i) {
|
||||
return (
|
||||
<div key={i + ""}>{entry.text}</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue