[DE mobile] Correct imports f7 and searchbar
This commit is contained in:
parent
3bfca10bcd
commit
a067234b87
|
@ -1,13 +1,9 @@
|
|||
|
||||
import React, { Component } from 'react';
|
||||
import { Popover, Popup, View, Page, List, ListItem, Navbar, NavRight, Link, f7 } from 'framework7-react';
|
||||
import { Toggle } from 'framework7-react';
|
||||
// import { f7 } from 'framework7-react/shared/f7.js';
|
||||
// import { Dom7 } from 'framework7';
|
||||
import { Popover, Popup, View, f7 } from 'framework7-react';
|
||||
import { Device } from '../../../../common/mobile/utils/device';
|
||||
import { observable, runInAction } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import Searchbar from 'framework7/components/searchbar'
|
||||
|
||||
const searchOptions = observable({
|
||||
usereplace: false,
|
||||
|
@ -106,13 +102,8 @@ class SearchView extends Component {
|
|||
$editor.on('pointerdown', this.onEditorTouchStart);
|
||||
$editor.on('pointerup', this.onEditorTouchEnd);
|
||||
|
||||
// if(!this.searchbar) {
|
||||
// // f7.searchbar.get('.searchbar');
|
||||
// // this.searchbar = Searchbar.get('.searchbar');
|
||||
// }
|
||||
|
||||
if(!this.searchbar) {
|
||||
this.searchbar = Searchbar.create({
|
||||
this.searchbar = f7.searchbar.create({
|
||||
el: '.searchbar',
|
||||
customSearch: true,
|
||||
expandable: true,
|
||||
|
|
|
@ -3,9 +3,8 @@ import React, { Suspense } from 'react';
|
|||
import { createRoot } from 'react-dom/client';
|
||||
|
||||
// Import Framework7
|
||||
// framework7/lite-bundle
|
||||
import Framework7 from 'framework7/lite';
|
||||
import { Dom7 } from 'framework7/lite';
|
||||
import Framework7 from 'framework7/lite-bundle';
|
||||
import { Dom7 } from 'framework7/lite-bundle';
|
||||
window.$$ = Dom7;
|
||||
|
||||
// Import Framework7-React Plugin
|
||||
|
|
|
@ -4,7 +4,6 @@ import { SearchController, SearchView, SearchSettingsView } from '../../../../co
|
|||
import { withTranslation } from 'react-i18next';
|
||||
import { Device } from '../../../../common/mobile/utils/device';
|
||||
import { observer, inject } from "mobx-react";
|
||||
// import { f7 } from 'framework7-react/shared/f7.js';
|
||||
|
||||
class SearchSettings extends SearchSettingsView {
|
||||
constructor(props) {
|
||||
|
@ -94,12 +93,12 @@ class DESearchView extends SearchView {
|
|||
const Search = withTranslation()(props => {
|
||||
const { t } = props;
|
||||
const _t = t('Settings', {returnObjects: true});
|
||||
// f7.searchbar.get('.searchbar')?.enabled &&
|
||||
|
||||
useEffect(() => {
|
||||
if(Device.phone) {
|
||||
if(f7.searchbar.get('.searchbar')?.enabled && Device.phone) {
|
||||
const api = Common.EditorApi.get();
|
||||
$$('.searchbar-input').focus();
|
||||
// api.asc_enableKeyEvents(false);
|
||||
api.asc_enableKeyEvents(false);
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
|
Loading…
Reference in a new issue