Disabe search input in encrypted room

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2022-01-17 12:19:35 +05:30
parent 8c30a013c7
commit 4f161fb891

View file

@ -109,8 +109,8 @@ function RoomSearch({ roomId }) {
const searchTerm = searchData?._query.search_categories.room_events.search_term ?? ''; const searchTerm = searchData?._query.search_categories.room_events.search_term ?? '';
const handleSearch = (e) => { const handleSearch = (e) => {
if (isRoomEncrypted) return;
e.preventDefault(); e.preventDefault();
if (isRoomEncrypted) return;
const searchTermInput = e.target.elements['room-search-input']; const searchTermInput = e.target.elements['room-search-input'];
const term = searchTermInput.value.trim(); const term = searchTermInput.value.trim();
@ -144,6 +144,7 @@ function RoomSearch({ roomId }) {
<Input <Input
placeholder="Search for keywords" placeholder="Search for keywords"
name="room-search-input" name="room-search-input"
disabled={isRoomEncrypted}
/> />
<Button iconSrc={SearchIC} variant="primary" type="submit">Search</Button> <Button iconSrc={SearchIC} variant="primary" type="submit">Search</Button>
</div> </div>