Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 230059 articles
Browse latest View live

Prev/Next between text fields iOS

$
0
0

I have a complex form that is dynamically generated and elements of it can be re-orderd by the user. The form can have well over 15 inputs, all small numbers that need entering. In a browser tabbing to the next input field works but on a iOS device the “next/prev” buttons in the iOS Keyboard Accessory are disabled. This seems to be an ongoing issue with Webkit and Ionic’s use of a shadow DOM when ion-inputs are placed in ion-items, so until the webkit team fix this that approach is not going to work.

I want to use the “Return” key to allow users to move to the next, I know it’s not ideal and against standards but at the moment this form is a pain to use so as a short term measure until Apple fixes the webkit issue I think this is best. There is also a slight lag on the iOS input field becoming active that makes tapping each input very annoying.

Can anyone suggest an approach to this? The elements can be reordered so keeping track of them with Angular Template Reference Variables doesn’t seem like a good approach, I almost just want a jQuery like “findNextSibling” type thing…

Thoughts would be very appreciated.

Simon


force uppercase

Click event in ion-checkbox inside ion-item trigger even outside checkbox

$
0
0

on clicking anywhere in the ion-item the click event defined in ion-checkbox is getting triggered. can anyone help

 <ion-item
    [class.animation-swipe-right] ="item.id === selectedid && segment =='Pending'"
    [class.animation-swipe-left] ="item.id === selectedid && segment =='Done'"
  
    >
      <ion-label>

        {{item | json}}
        <h3>{{item.itemname}}</h3>
        <p>
          {{item.itemqty}} &mdash; {{item.itemunit}}
        </p>
      </ion-label>
      <div>
        <ion-checkbox [attr.checked]="item.isCompleted" (click)="makeItemChecked($event,item); 
        $event.stopPropagation();"></ion-checkbox>
      </div>
      
    </ion-item>

Admob ionic issue

$
0
0

Hello , I’m encountering the same issue, did you find a solution ?

TS1128, TS1005 errors in Ionic Camera Example

$
0
0

Try This …

import { Injectable } from ‘@angular/core’;
import { Plugins, CameraResultType, Capacitor, FilesystemDirectory, CameraPhoto, CameraSource } from ‘@capacitor/core’;
const { Camera, Filesystem, Storage } = Plugins;
@Injectable({
providedIn: ‘root’
})
export class PhotoService {

constructor() { }

public async addNewToGallery() {
    // Take a photo
    const capturedPhoto = await Camera.getPhoto({
        resultType: CameraResultType.Uri, 
        source: CameraSource.Camera, 
        quality: 100 
    });
}

}

How to show wordress post catagory in ionic 5

$
0
0

Hi
How to show Wordpress catagory link in ion tabs eg if i try use ```
IonTabButton tab=“Home”>
Its work but all Wordpress categorie list show but
I am unsuccess to show

IonTabButton tab="Home/6">
But not work in tab Any One help me out how to show sub categories 
I also try with 
IonTabButton click=Home/6 Not work click only working in ion button

Ionic 4 back button not working

$
0
0

I am also facing the same issue.Considering a basic page hardware back button does nothing.

Ion-Searchbar - hide clear button


IonRouterOutlet has no animation in Ionic React 5.1.1

Ionic 4/5 - Prevent double tap zoom in IOS

$
0
0

Same issue here with the suggested meta viewport tags set as mentioned.

Web browser annoyingly zooms in as mentioned by @karvanj but if the app is installed as a PWA the zoom in is surpressed.

"@ionic/react": "^5.1.1"

Could not find plugin "proposal-numeric-separator"

$
0
0

Thanks a lot !! This actually works !!

Capacitor core LocalNotifications every hour at specific minute

$
0
0

Hi everyone,

What I’m using is LocalNotifications from @capacitor/core.
So what I did is this:

LocalNotifications.schedule({
	notifications: [
		{
			title: 'Title',
			body: 'Body',
			id: 1,
			schedule: {every: 'hour', on: {minute: 40}},
		}
	]
});

But it doesn’t work.
Any ideas?

I Built a fully functional offline Music player with ionic 4

$
0
0

Hello everyone, I built a fully functional offline Music app with Ionic 4/Angular 8 (Couldn’t use ionic 5 as I had gone too far by the time it was fully released). This app is truly fully functional with support for audio id3 tags and album art all of which is processed locally on the device since this is dealing with locally stored files, it supports almost all files including lossless FLACS and 3d audio effect, file sharing etc. while featuring a unique neumorphic UI.
I also added support for external memory cards which is not normally supported by the files plugin and the initial saving of the scanned music data is partly handled by a background thread via webworkers since saving to database crashes on some devices with a ton of music files.
As an ionic enthusiast, I just want people to know that such apps are possible on ionic since there seems to be scarcity of materials on the topic so I wasn’t entirely sure it was possible until I built it.

Lastly, it is free and without ads, current version is 0.93.

Check it out on Playstore

How to disabled div attribute

$
0
0

How to disabled div attribute i want to disabled a div based on condition is there any solution for it?

Bottom drawer (Cupertino Pane)

$
0
0

I haven’t tested it yet but it looks nice. Is it fully compatible with ionic 4?


Ion-picker in React: modify options with ionPickerColChange

$
0
0

Hi,
I’m trying to use the ion-picker component with multiple columns in a React Ionic app.

I need to set the possible values in one column based on the selected values in the other columns analogous to what the ion-datetime component is doing (where the values for day depend on the selected month and year).

I can catch the change with

document.addEventListener('ionPickerColChange', (event) => {
    ...
    this.setState({ columns: ... })
}

The problem is that the picker (which receives the columns as <IonPicker … columns={this.state.columns} /> doesn’t seem to get refreshed when the state changes. Items that should be disabled are still there and only disappear when I close and reopen the picker.

Any idea how I can solve this? Or alternatively, does someone know an npm package that I can use instead which contains components for a datepicker and a custom picker which supports this functionality?

Thanks!

Ionic React Newbie: Why this React code doesn't re-render itself?

$
0
0

It’s a simple screen where user can enter a Github username and some info associated with it will be shown.

It works fine witth MockData (offline array)

So you type in SearchBar -> Updates Home’s State -> Home Passes updated “profiles” to CardList -> Passes to Card.

I can see in devtools the console log works. I’ve also implemented this on plain react and it works. I wonder what I am missing here?

import React, { useState, useEffect } from "react";
import axios from "axios";
import {
  IonContent,
  IonHeader,
  IonList,
  IonPage,
  IonTitle,
  IonToolbar,
  useIonViewWillEnter,
  IonSearchbar,
  IonListHeader,
  IonItem,
  IonAvatar,
  IonLabel,
} from "@ionic/react";
import "./Home.css";

const mockData = [
  {
    id: "1",
    name: "Sans Mansion",
    company: "WOL",
    avatar_url: "https://placehold.it/100",
  },
  {
    id: "2",
    name: "John Doe",
    comapny: "Deere Farms",
    avatar_url: "https://placehold.it/100",
  },
];

interface Profile {
  id: string;
  name: string;
  company: string;
  avatar_url: string;
}

interface CardListProps {
  profiles: Profile[];
}

interface CardProps {
  id: string;
  name: string;
  company: string;
  avatar_url: string;
}

interface SearchBarInterface {
  updateProfiles: Function
}

const Card: React.FC<CardProps> = (props) => {
  return (
    <IonItem>
      <IonAvatar slot="start">
        <img src={props.avatar_url}></img>
      </IonAvatar>
      <IonLabel>
        <h2>{props.name}</h2>
        <p>{props.company}</p>
      </IonLabel>
    </IonItem>
  );
};

const CardList: React.FC<CardListProps> = (props) => {
  return (
    <IonList>
      {props.profiles.map((profile) => (
        <Card
          key={profile.id}
          id={profile.id}
          name={profile.name}
          company={profile.company}
          avatar_url={profile.avatar_url}
        />
      ))}
    </IonList>
  );
};

const SearchBar: React.FC<SearchBarInterface> = (props) => {
  const [searchText, setSearchText] = React.useState("");

  const handleSearch = async (e: CustomEvent) => {
    const response = await axios.get(`https://api.github.com/users/${searchText}`)
    props.updateProfiles(response.data)
  };

  const handleInput = (e: CustomEvent) => {
    setSearchText((e.target as HTMLInputElement).value);
  };

  return (
    <IonSearchbar
      value={searchText}
      onIonChange={handleSearch}
      onIonInput={handleInput}
      animated
      debounce={1000}
    />
  );
};

const Home: React.FC = (props) => {
  const [profiles, setProfiles] = useState<Profile[]>([]);

  useIonViewWillEnter(() => {
    console.log('will enter')
  });


  const updateProfiles = (profile: Profile) => {
    let newProfiles = profiles
    newProfiles.push(profile)
    setProfiles(newProfiles)
    console.log(profiles)
  }

  return (
    <IonPage id="home-page">
      <IonHeader>
        <IonToolbar>
          <IonTitle>GitHub Cards App</IonTitle>
        </IonToolbar>
        <IonToolbar>
          <SearchBar updateProfiles={updateProfiles}/>
        </IonToolbar>
      </IonHeader>
      <IonContent fullscreen>
        <IonListHeader>Search Results</IonListHeader>
        <CardList profiles={profiles} />
      </IonContent>
    </IonPage>
  );
};


export default Home;

Bottom drawer (Cupertino Pane)

$
0
0

Sure, all js frameworks, but the best experience with Ionic on devices.

Ionic 4 custom fonts

$
0
0

Please why was it written 3 times?
@font-face{}
@font-face{}
@font-face{}

Error al consumir webApi

$
0
0

Buenas comunidad, soy nuevo desarrollando en Ionic 5, tengo un problema con una app que he creado, tengo una web api en .Net Core y una base de datos sql server la cual ambas tengo publicada en la nube y al hacer pruebas de mi app desde el navegador funciona bien el CRUD que he hecho, pero al generar el apk e instalarla en mi móvil android no me muestra los datos no se si hago algo mal al generar el apk o tengo que hacer algunas configuraciones, el comando que utilizó para generar el apk es ionic cordova build android, ya probe instalando esa apk también firmandola pero no logro conectar mi app móvil con el servicio web que tengo en la nube, si alguien me puede guiar se lo agradeceria mucho ya que estoy muy interesado en aprender al 100 este framework.

Viewing all 230059 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>