Skip to content

v7_TextField #2468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions demo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ module.exports = {
return require('./screens/componentScreens/TextScreen').default;
},
// TODO: fix Expo issues (navigation) before un-commenting
// get TextFieldScreen() {
// return require('./screens/componentScreens/TextFieldScreen').default;
// },
get TextFieldScreen() {
return require('./screens/componentScreens/TextFieldScreen').default;
},
get TourScreen() {
return require('./screens/componentScreens/TourScreen').default;
},
Expand Down Expand Up @@ -215,9 +215,6 @@ module.exports = {
return require('./screens/componentScreens/ProgressBarScreen').default;
},
// Incubator
get IncubatorTextFieldScreen() {
return require('./screens/incubatorScreens/IncubatorTextFieldScreen').default;
},
get PanViewScreen() {
return require('./screens/incubatorScreens/PanViewScreen').default;
},
Expand Down
1 change: 0 additions & 1 deletion demo/src/screens/MenuStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ export const navigationData = {
{title: 'ChipsInput', tags: 'chips input', screen: 'unicorn.components.ChipsInputScreen'},
{title: 'Native TouchableOpacity', tags: 'touchable native', screen: 'unicorn.incubator.TouchableOpacityScreen'},
{title: 'Dialog (New)', tags: 'dialog modal popup alert', screen: 'unicorn.incubator.IncubatorDialogScreen'},
{title: 'TextField (New)', tags: 'text field input', screen: 'unicorn.components.IncubatorTextFieldScreen'},
{title: 'Toast (New)', tags: 'toast', screen: 'unicorn.components.IncubatorToastScreen'},
{
title: 'ExpandableOverlay',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import _ from 'lodash';
import React, {Component} from 'react';
import {TextInput, StyleSheet, ScrollView, ActivityIndicator} from 'react-native';
import {Assets, Colors, Spacings, Typography, View, Text, Button, Keyboard, Incubator} from 'react-native-ui-lib'; //eslint-disable-line
const {TextField} = Incubator;
import {Assets, Colors, Spacings, Typography, View, Text, Button, Keyboard, TextField, TextFieldMethods} from 'react-native-ui-lib'; //eslint-disable-line
const {KeyboardAwareInsetsView} = Keyboard;

const priceFormatter = Intl.NumberFormat('en-US');

export default class TextFieldScreen extends Component {
input = React.createRef<TextInput>();
input2 = React.createRef<TextInput>();
inputWithValidation = React.createRef<TextInput>();
inputWithValidation = React.createRef<TextFieldMethods>();
state = {
errorPosition: TextField.validationMessagePositions.TOP,
shouldDisable: false,
isReadonly: false,
value: 'Initial Value',
searching: false,
preset: 'withUnderline'
preset: 'withUnderline',
price: ''
};

componentDidMount() {
Expand Down Expand Up @@ -162,6 +162,7 @@ export default class TextFieldScreen extends Component {

<View row top marginT-s4>
<TextField
// @ts-expect-error
ref={this.inputWithValidation}
placeholder="Enter full name"
validate="required"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading