Skip to content

Commit b2d8229

Browse files
boatcoder@gmail.comboatcoder@gmail.com
authored andcommitted
Attempt at fixing the onChange problem in the documentation and in the propTypes
Not sure what yarn start should do, but it is not refreshing on changes to the underlying files: info changed file at /private/tmp/react-bootstrap/src/FormFileInput.tsx success onPreExtractQueries - 0.032s success extract queries from components - 0.181s success write out requires - 0.002s success Re-building development bundle - 2.683s warn Warning: Event "xstate.after(1000)#waitingMachine.batchingNodeMutations" was sent to stopped service "waitingMachine". This service has already reached its final state, and will not transition. Event: {"type":"xstate.after(1000)#waitingMachine.batchingNodeMutations"}
1 parent 3998fd8 commit b2d8229

File tree

2 files changed

+41
-3
lines changed

2 files changed

+41
-3
lines changed

src/FormFileInput.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export interface FormFileInputProps extends BsPrefixProps, BsCustomPrefixProps {
1515
isValid?: boolean;
1616
isInvalid?: boolean;
1717
lang?: string;
18+
onChange?: (event: any) => void;
1819
}
1920
type FormFileInput = BsPrefixRefForwardingComponent<
2021
'input',
@@ -52,6 +53,10 @@ const propTypes = {
5253

5354
/** The language for the button when using custom file input and SCSS based strings */
5455
lang: PropTypes.string,
56+
57+
/** Called when the value of the input changes with an `event`.
58+
`event.target` is the `<input type='file'>` component with the changed value, `event.target.files` is the current list of files */
59+
onChange: PropTypes.func,
5560
};
5661

5762
const FormFileInput: FormFileInput = React.forwardRef(

www/yarn.lock

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
semver "^5.4.1"
4646
source-map "^0.5.0"
4747

48-
"@babel/generator@^7.10.3", "@babel/generator@^7.11.0", "@babel/generator@^7.11.4", "@babel/generator@^7.3.4", "@babel/generator@^7.9.6":
48+
"@babel/generator@^7.10.3", "@babel/generator@^7.11.0", "@babel/generator@^7.3.4", "@babel/generator@^7.9.6":
4949
version "7.11.4"
5050
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.4.tgz#1ec7eec00defba5d6f83e50e3ee72ae2fee482be"
5151
integrity sha512-Rn26vueFx0eOoz7iifCN2UHT6rGtnkSGWSoDRIy8jZN3B91PzeSULbswfLoOWuTuAcNwpG/mxy+uCTDnZ9Mp1g==
@@ -54,6 +54,15 @@
5454
jsesc "^2.5.1"
5555
source-map "^0.5.0"
5656

57+
"@babel/generator@^7.11.4", "@babel/generator@^7.11.5":
58+
version "7.11.6"
59+
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.6.tgz#b868900f81b163b4d464ea24545c61cbac4dc620"
60+
integrity sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==
61+
dependencies:
62+
"@babel/types" "^7.11.5"
63+
jsesc "^2.5.1"
64+
source-map "^0.5.0"
65+
5766
"@babel/helper-annotate-as-pure@^7.10.1", "@babel/helper-annotate-as-pure@^7.10.4":
5867
version "7.10.4"
5968
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3"
@@ -280,7 +289,7 @@
280289
chalk "^2.0.0"
281290
js-tokens "^4.0.0"
282291

283-
"@babel/parser@7.11.4", "@babel/parser@^7.0.0-beta.54", "@babel/parser@^7.10.3", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.11.4", "@babel/parser@^7.7.0":
292+
"@babel/parser@7.11.4", "@babel/parser@^7.0.0-beta.54", "@babel/parser@^7.10.3", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.11.4", "@babel/parser@^7.11.5", "@babel/parser@^7.7.0":
284293
version "7.11.4"
285294
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.4.tgz#6fa1a118b8b0d80d0267b719213dc947e88cc0ca"
286295
integrity sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA==
@@ -911,7 +920,7 @@
911920
"@babel/parser" "^7.10.4"
912921
"@babel/types" "^7.10.4"
913922

914-
"@babel/traverse@^7.0.0-beta.38", "@babel/traverse@^7.0.0-beta.54", "@babel/traverse@^7.10.1", "@babel/traverse@^7.10.2", "@babel/traverse@^7.10.3", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0", "@babel/traverse@^7.6.2", "@babel/traverse@^7.7.0":
923+
"@babel/traverse@^7.0.0-beta.38", "@babel/traverse@^7.0.0-beta.54", "@babel/traverse@^7.10.1", "@babel/traverse@^7.10.2", "@babel/traverse@^7.10.3", "@babel/traverse@^7.10.4", "@babel/traverse@^7.6.2", "@babel/traverse@^7.7.0":
915924
version "7.11.0"
916925
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24"
917926
integrity sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==
@@ -926,6 +935,21 @@
926935
globals "^11.1.0"
927936
lodash "^4.17.19"
928937

938+
"@babel/traverse@^7.11.0":
939+
version "7.11.5"
940+
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.5.tgz#be777b93b518eb6d76ee2e1ea1d143daa11e61c3"
941+
integrity sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==
942+
dependencies:
943+
"@babel/code-frame" "^7.10.4"
944+
"@babel/generator" "^7.11.5"
945+
"@babel/helper-function-name" "^7.10.4"
946+
"@babel/helper-split-export-declaration" "^7.11.0"
947+
"@babel/parser" "^7.11.5"
948+
"@babel/types" "^7.11.5"
949+
debug "^4.1.0"
950+
globals "^11.1.0"
951+
lodash "^4.17.19"
952+
929953
"@babel/types@^7.0.0-beta.38", "@babel/types@^7.0.0-beta.54", "@babel/types@^7.10.1", "@babel/types@^7.10.3", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.3.4", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.9.6":
930954
version "7.11.0"
931955
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d"
@@ -935,6 +959,15 @@
935959
lodash "^4.17.19"
936960
to-fast-properties "^2.0.0"
937961

962+
"@babel/types@^7.11.5":
963+
version "7.11.5"
964+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d"
965+
integrity sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==
966+
dependencies:
967+
"@babel/helper-validator-identifier" "^7.10.4"
968+
lodash "^4.17.19"
969+
to-fast-properties "^2.0.0"
970+
938971
"@emotion/cache@^10.0.27":
939972
version "10.0.29"
940973
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0"

0 commit comments

Comments
 (0)