Disabe search input in encrypted room
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
8c30a013c7
commit
4f161fb891
1 changed files with 2 additions and 1 deletions
|
@ -109,8 +109,8 @@ function RoomSearch({ roomId }) {
|
|||
const searchTerm = searchData?._query.search_categories.room_events.search_term ?? '';
|
||||
|
||||
const handleSearch = (e) => {
|
||||
if (isRoomEncrypted) return;
|
||||
e.preventDefault();
|
||||
if (isRoomEncrypted) return;
|
||||
const searchTermInput = e.target.elements['room-search-input'];
|
||||
const term = searchTermInput.value.trim();
|
||||
|
||||
|
@ -144,6 +144,7 @@ function RoomSearch({ roomId }) {
|
|||
<Input
|
||||
placeholder="Search for keywords"
|
||||
name="room-search-input"
|
||||
disabled={isRoomEncrypted}
|
||||
/>
|
||||
<Button iconSrc={SearchIC} variant="primary" type="submit">Search</Button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue