Disabe search input in encrypted room
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user